aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-11-09 22:51:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-11-09 22:51:02 -0800
commit21556e37f4596cd7020337f1a8f039364c47c04b (patch)
treeee9198d3beea147be595de0b7757fcbf278030c0
parentbd24e83c8188866d37c1468d948d44692e6547a4 (diff)
downloadpandoc-21556e37f4596cd7020337f1a8f039364c47c04b.tar.gz
Allow HTML comments as inline elements in markdown.
So, aaa <!-- comment --> bbb can be a single paragraph.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--tests/markdown-reader-more.native4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 8c6a90edb..b655ea1a9 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1302,7 +1302,7 @@ rawHtmlInline' = do
st <- getState
result <- if stateStrict st
then choice [htmlBlockElement, anyHtmlTag, anyHtmlEndTag]
- else anyHtmlInlineTag
+ else choice [htmlComment, anyHtmlInlineTag]
return $ HtmlInline result
#ifdef _CITEPROC
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native
index 200855a09..884fe868e 100644
--- a/tests/markdown-reader-more.native
+++ b/tests/markdown-reader-more.native
@@ -18,8 +18,8 @@ Pandoc (Meta {docTitle = [Str "Title",Space,Str "spanning",Space,Str "multiple",
, Para [Math InlineMath "\\$2 + \\$3"]
, Header 2 [Str "Commented",Str "-",Str "out",Space,Str "list",Space,Str "item"]
, BulletList
- [ [ Plain [Str "one"]
- , RawHtml "<!--\n- two\n-->" ], [ Plain [Str "three"] ] ]
+ [ [ Plain [Str "one",Space,HtmlInline "<!--\n- two\n-->"] ]
+ , [ Plain [Str "three"] ] ]
, Header 2 [Str "Backslash",Space,Str "newline"]
, Para [Str "hi",LineBreak,Str "there"]
, Header 2 [Str "Code",Space,Str "spans"]