Document that Image alt text must be in quotes

Because:
It seems that during conversion from source to html the image alt text gets truncated when the image alt text contains a comma.

Example: menu-link-from-context contains this image + alt text:

image:images/menu-link-from-content-.png[Granting users with the
Vendor role the rights to create, delete and edit Recipes]

This is the resulting HTML:

<p><span class="inlinemediaobject"><img src="images/menu-link-from-content-.png" alt="Granting users with the Vendor role the rights to create" /></span></p>

CommentFileSizeAuthor
#4 formatting-alt-text-2528834-4.patch1.16 KBbatigolix
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

batigolix’s picture

Component: User Guide content » Contributor Guidelines content
Assigned: Unassigned » batigolix
Category: Bug report » Task

ehhh, well .... It works fine when the caption text is in quotes. So this needs to be documented (if it isnt already)

batigolix’s picture

Title: Image caption that includes commas gets truncated » Document that Image captions must be in quotes
Issue summary: View changes
batigolix’s picture

Title: Document that Image captions must be in quotes » Document that Image alt text must be in quotes
Issue summary: View changes
batigolix’s picture

Status: Active » Needs review
FileSize
1.16 KB

Patch for the formatting.txt guideline

eojthebrave’s picture

Status: Needs review » Fixed

Nice catch. I agree that defaulting to just using quotations is the best way to go here. It'll help avoid confusion for others in the future. Thanks @batigolix. I've added your updates and committed the changes.

jhodgdon’s picture

Thanks! Yeah, the way macros work in AsciiDoc (and the "include an image" thing is a macro), commas are special because they indicate separation between parameters for the macro. So that's an explanation for why what you already figured out works that way. :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.