diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-10-13 10:36:27 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-10-13 10:36:27 -0700 |
commit | 6934b921b35950d0a86a966ed3aff7ba1b660ca6 (patch) | |
tree | f275b45bda21e252be63abe4a38c6b3d6abf986d /src/Text | |
parent | 3720005c53679317aea05f8b9ce53d1451adba69 (diff) | |
download | pandoc-6934b921b35950d0a86a966ed3aff7ba1b660ca6.tar.gz |
CommonMark writer: omit "fig:" prefix in image titles.
This is used internally to indicate internal figures.
See https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19-b4c1-8
975cea8df0f@googlegroups.com?utm_medium=email&utm_source=footer
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/CommonMark.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/CommonMark.hs b/src/Text/Pandoc/Writers/CommonMark.hs index 446578f42..7ea76a373 100644 --- a/src/Text/Pandoc/Writers/CommonMark.hs +++ b/src/Text/Pandoc/Writers/CommonMark.hs @@ -257,6 +257,9 @@ inlineToNodes opts (SmallCaps xs) = [node (HTML_INLINE (T.pack "</span>")) []]) ++ ) inlineToNodes opts (Link _ ils (url,tit)) = (node (LINK (T.pack url) (T.pack tit)) (inlinesToNodes opts ils) :) +-- title beginning with fig: indicates implicit figure +inlineToNodes opts (Image alt ils (url,'f':'i':'g':':':tit)) = + inlineToNodes opts (Image alt ils (url,tit)) inlineToNodes opts (Image _ ils (url,tit)) = (node (IMAGE (T.pack url) (T.pack tit)) (inlinesToNodes opts ils) :) inlineToNodes _ (RawInline fmt xs) |