Textile reader: Correctly handle entities.

This commit is contained in:
John MacFarlane 2013-06-11 10:16:54 -07:00
parent 96f25f924a
commit 50ba5a801a
3 changed files with 9 additions and 1 deletions

View file

@ -374,6 +374,7 @@ inlineParsers = [ str
, link
, image
, mark
, (Str . (:[])) <$> characterReference
, smartPunctuation inline
, symbol
]
@ -424,7 +425,7 @@ note = try $ do
-- | Special chars
markupChars :: [Char]
markupChars = "\\*#_@~-+^|%=[]"
markupChars = "\\*#_@~-+^|%=[]&"
-- | Break strings on following chars. Space tab and newline break for
-- inlines breaking. Open paren breaks for mark. Quote, dash and dot

View file

@ -134,6 +134,8 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,[[Plain [Str "joan"]]
,[Plain [Str "24"]]
,[Plain [Str "f"]]]]
,Header 1 ("",[],[]) [Str "Entities"]
,Para [Str "*",LineBreak,Str "&"]
,Header 1 ("",[],[]) [Str "Raw",Space,Str "HTML"]
,Para [Str "However",Str ",",Space,RawInline "html" "<strong>",Space,Str "raw",Space,Str "HTML",Space,Str "inlines",Space,RawInline "html" "</strong>",Space,Str "are",Space,Str "accepted",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str ":"]
,RawBlock "html" "<div class=\"foobar\">"

View file

@ -203,6 +203,11 @@ table{foo:bar}.
| name | age | sex |
| joan | 24 | f |
h1. Entities
&#42;
&amp;
h1. Raw HTML
However, <strong> raw HTML inlines </strong> are accepted, as well as :