3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Keep an image's URL and title inside a link as (image) after the link

This commit is contained in:
2026-10-22 22:15:34 +02:00
parent add0ac96ff
commit b49e134aca
9 changed files with 93 additions and 47 deletions
+6 -4
View File
@@ -554,10 +554,12 @@ Serves [Goals](#goals) 1, 4 and 5.
blank line between it and any other line.
- A code span inside emphasis reads as code without the emphasis, since ADF gives code text no
mark but a link or an annotation: ``**`npm ci`**`` reads as `` `npm ci` ``.
- Inside a link, an image reads as plain text the link marks. A link alone in its paragraph
whose whole text is one image reads as that image, with the link marking it.
- An image's title becomes its caption when the image stays an image, and its link's title when
it becomes linked alt text. Inside another link, the title is dropped.
- Inside a link, an image reads as plain text the link marks, and `(image)` follows the link,
linked to the image: `[look at ![the moon](moon.png) tonight](/moon)` reads as
`[look at the moon tonight](/moon) ([image](moon.png))`. A link alone in its paragraph whose
whole text is one image reads as that image, with the link marking it.
- An image's title becomes its caption when the image stays an image, and otherwise the title of
the link to the image.
And these, for other reasons: a shortcut reference matching its definition only under Unicode case
folding stays unresolved, and a link whose text holds an autolink keeps the inner link and leaves