Skip to content

Commit 9acff99

Browse files
committed
Textile reader: inline constructors don't trigger if closer...
...is preceded by whitespace. Closes #10414.
1 parent 63a949d commit 9acff99

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Text/Pandoc/Readers/Textile.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,9 @@ simpleInline border construct = try $ do
783783
attr <- attributes
784784
body <- trimInlines . mconcat <$>
785785
withQuoteContext InSingleQuote
786-
(manyTill (notFollowedBy newline >> inline)
786+
(manyTill (((B.space <>) <$>
787+
(whitespace *> notFollowedBy newline >> inline))
788+
<|> (notFollowedBy newline >> inline))
787789
(try border <* notFollowedBy alphaNum))
788790
return $ construct $
789791
if attr == nullAttr

test/command/10414.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```
2+
% pandoc -f textile -t html
3+
from 30.-100. text, inside - after dash
4+
^D
5+
<p>from 30.–100. text, inside - after dash</p>
6+
```

0 commit comments

Comments
 (0)