aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-08 12:15:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-08 12:18:47 -0700
commitdd78dd6d1beb860416c1c9114064d2e7bc1ff86a (patch)
tree87605fef1b31cbb82d7af4e14356cd788b1fd2b8
parente5fb97ff4faf9473287499ccf60783cc2d7785e9 (diff)
downloadpandoc-dd78dd6d1beb860416c1c9114064d2e7bc1ff86a.tar.gz
Textile reader: don't allow inline formatting to extend over newline.
This matches behavior of RedCarpet, avoids some ugly bugs, and improves performance.
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 6d839ec1d..0562bd2ce 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -616,7 +616,8 @@ simpleInline border construct = try $ do
attr <- attributes
body <- trimInlines . mconcat <$>
withQuoteContext InSingleQuote
- (manyTill inline (try border <* notFollowedBy alphaNum))
+ (manyTill (notFollowedBy newline >> inline)
+ (try border <* notFollowedBy alphaNum))
return $ construct $
if attr == nullAttr
then body