aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs5
-rw-r--r--tests/textile-reader.native2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 89f281ae8..5cda061ef 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -412,7 +412,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
@@ -430,7 +430,8 @@ hyphenedWords :: Parser [Char] ParserState String
hyphenedWords = try $ do
hd <- noneOf wordBoundaries
tl <- many ( (noneOf wordBoundaries) <|>
- try (oneOf markupChars <* lookAhead (noneOf wordBoundaries) ) )
+ try (notFollowedBy' note *> oneOf markupChars
+ <* lookAhead (noneOf wordBoundaries) ) )
let wd = hd:tl
option wd $ try $
(\r -> concat [wd, "-", r]) <$> (char '-' *> hyphenedWords)
diff --git a/tests/textile-reader.native b/tests/textile-reader.native
index 7532a8fda..84dc50516 100644
--- a/tests/textile-reader.native
+++ b/tests/textile-reader.native
@@ -155,4 +155,4 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,Para [Str "\174",Space,Str "Hi",Str "\174"]
,Para [Str "Hi",Str "\169",Str "2008",Space,Str "\169",Space,Str "2008"]
,Header 1 [Str "Footnotes"]
-,Para [Str "A",Space,Str "note",Str ".",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here",Str "!",Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note."]],Str "."]]]]
+,Para [Str "A",Space,Str "note",Str ".",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here",Str "!"]],Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note",Str "."]],Str "."]]