aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs5
1 files changed, 3 insertions, 2 deletions
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