Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consume changes to ImageReference making the alt property optional #27

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

DavidBrunow
Copy link

Consume changes to the alt text being optional.

@@ -173,7 +173,7 @@ extension DocCArchive.ImageReference {
var ms = "<picture><source\(media) srcset='\(srcset)'>"

ms += "<img"
if !alt.isEmpty { ms += " alt='\(alt.htmlEscaped)'" }
if alt?.isEmpty == false { ms += " alt='\(alt!.htmlEscaped)'" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do an if let alt = alt, !alt.isEmpty { here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, happy to make that change!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done. I did something similar to match in the other pull request.

@helje5 helje5 merged commit 7d55a51 into DoccZz:develop Jun 8, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants