Markdown reader: improved handling of mmd link attributes in references.
Previously they only worked for links that had titles. Closes #7080.
commit8e9131db4edfda6deafdf94939b907e4dce3cbaa
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 6 Feb 2021, 21:52 (6 years ago)
parent0ab3e40
src/Text/Pandoc/Readers/Markdown.hs+2
@@ -334,6 +334,8 @@ referenceKey = try $ do
334334 skipMany spaceChar
335335 notFollowedBy' referenceTitle
336336 notFollowedBy' $ guardEnabled Ext_link_attributes >> attributes
337+ notFollowedBy' $ guardEnabled Ext_mmd_link_attributes >>
338+ try (spnl <* keyValAttr)
337339 notFollowedBy' (() <$ reference)
338340 many1Char $ notFollowedBy space >> litChar
339341 let betweenAngles = try $ char '<' >> manyTillChar litChar (char '>')
test/command/7080.mdnew file+8
@@ -0,0 +1,8 @@
1+```
2+% pandoc -f markdown_mmd -t native
3+![][image]
4+
5+[image]: image.png width=100px height=150px
6+^D
7+[Para [Image ("",[],[("width","100px"),("height","150px")]) [] ("image.png","")]]
8+```