From f6007e7146460643a8fe4a4d3434001c6ef136bb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 6 Dec 2017 16:05:27 -0800 Subject: Markdown reader: accept processing instructions as raw HTML. Closes #4125. --- src/Text/Pandoc/Readers/HTML.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index b0f5d38f9..f5f296712 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -1155,8 +1155,9 @@ htmlTag f = try $ do -- in XML element names let isNameChar c = isAlphaNum c || c == ':' || c == '-' || c == '_' let isName s = case s of - [] -> False - (c:cs) -> isLetter c && all isNameChar cs + [] -> False + ('?':_) -> True -- processing instruction + (c:cs) -> isLetter c && all isNameChar cs let endpos = if ln == 1 then setSourceColumn startpos -- cgit v1.2.3