cmark

My personal build of CMark ✏️

Commit
5e9db2581e94efb497b9e5a22ce4ff98f9fd7de7
Parent
dc4a6c8cdaa1bd9b9d6baee0b992541f745cadc9
Author
John MacFarlane <jgm@berkeley.edu>
Date

Spec: use terminology of "image description" rather than "alt text".

"alt text" has to do with one possible rendering decision.

Diffstat

1 file changed, 13 insertions, 13 deletions

Status File Name N° Changes Insertions Deletions
Modified spec.txt 26 13 13
diff --git a/spec.txt b/spec.txt
@@ -5884,16 +5884,15 @@ is followed by a link label (even though `[bar]` is not defined):
 
 ## Images
 
-Syntax for images is very much like the syntax for links.  To a
-first approximation: an (unescaped) exclamation mark (`!`) followed by
-a reference or inline link will be parsed as an image.  The plain
-string content of the link text will be used as the image's alt text,
-and the link title, if any, will be used as the image's title.
-
-There is just one important difference.  A [link text](#link-text) can
-contain images, but not other links.  An image's alt text, by
-contrast, can contain links, but not images.
-
+Syntax for images is like the syntax for links, with one
+difference. Instead of [link text](#link-text), we have an [image
+description](@image-description).  The rules for this are the
+same as for [link text](#link-text), except that (a) an
+image description starts with `![` rather than `[`, and
+(b) an image description may contain links, but not images
+(even deeply nested).  An image description has inline elements
+as its contents.  When an image is rendered to HTML,
+this is standardly used as the image's `alt` attribute.
 
 .
 ![foo](/url "title")
@@ -5923,9 +5922,10 @@ contrast, can contain links, but not images.
 
 Though this spec is concerned with parsing, not rendering, it is
 recommended that in rendering to HTML, only the plain string content
-of the alt text be used.  Note that in the above example, the alt text
-is `foo bar`, not `foo [bar](/url)` or `foo <a href="/url">bar</a>`.
-Only the plain string content is rendered, without formatting.
+of the [image description](#image-description) be used.  Note that in
+the above example, the alt attribute's value is `foo bar`, not `foo
+[bar](/url)` or `foo <a href="/url">bar</a>`.  Only the plain string
+content is rendered, without formatting.
 
 .
 ![foo *bar*][]