Textile reader: don't allow inline formatting to extend over newline.

This matches behavior of RedCarpet, avoids some ugly bugs, and improves
performance.
This commit is contained in:
John MacFarlane
2014-08-08 12:18:47 -07:00
parent e5fb97ff4f
commit dd78dd6d1b
+2 -1
View File
@@ -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