git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: Correctly handle entities.
50ba5a8John MacFarlane
src/Text/Pandoc/Readers/Textile.hs+2−1
@@ -374,6 +374,7 @@ inlineParsers = [ str
374 , link
374 , link
375 , image
375 , image
376 , mark
376 , mark
377+ , (Str . (:[])) <$> characterReference
377 , smartPunctuation inline
378 , smartPunctuation inline
378 , symbol
379 , symbol
379 ]
380 ]
@@ -424,7 +425,7 @@ note = try $ do
424
425
425-- | Special chars
426-- | Special chars
426markupChars :: [Char]
427markupChars :: [Char]
427−markupChars = "\\*#_@~-+^|%=[]"
428+markupChars = "\\*#_@~-+^|%=[]&"
428
429
429-- | Break strings on following chars. Space tab and newline break for
430-- | Break strings on following chars. Space tab and newline break for
430-- inlines breaking. Open paren breaks for mark. Quote, dash and dot
431-- inlines breaking. Open paren breaks for mark. Quote, dash and dot
tests/textile-reader.native+2
@@ -134,6 +134,8 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
134 ,[[Plain [Str "joan"]]
134 ,[[Plain [Str "joan"]]
135 ,[Plain [Str "24"]]
135 ,[Plain [Str "24"]]
136 ,[Plain [Str "f"]]]]
136 ,[Plain [Str "f"]]]]
137+,Header 1 ("",[],[]) [Str "Entities"]
138+,Para [Str "*",LineBreak,Str "&"]
137,Header 1 ("",[],[]) [Str "Raw",Space,Str "HTML"]
139,Header 1 ("",[],[]) [Str "Raw",Space,Str "HTML"]
138,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 ":"]
140,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 ":"]
139,RawBlock "html" "<div class=\"foobar\">"
141,RawBlock "html" "<div class=\"foobar\">"
tests/textile-reader.textile+5
@@ -203,6 +203,11 @@ table{foo:bar}.
203| name | age | sex |
203| name | age | sex |
204| joan | 24 | f |
204| joan | 24 | f |
205
205
206+h1. Entities
207+
208+&#42;
209+&amp;
210+
206h1. Raw HTML
211h1. Raw HTML
207
212
208However, <strong> raw HTML inlines </strong> are accepted, as well as :
213However, <strong> raw HTML inlines </strong> are accepted, as well as :