Markdown reader: accept processing instructions as raw HTML.
Closes #4125.
This commit is contained in:
parent
4066a385ac
commit
f6007e7146
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
6
test/command/4125.md
Normal file
6
test/command/4125.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc
|
||||
<?asciidoc-toc?>
|
||||
^D
|
||||
<?asciidoc-toc?>
|
||||
```
|
Loading…
Reference in a new issue