Skip to content

Commit

Permalink
Textile reader: inline constructors don't trigger if closer...
Browse files Browse the repository at this point in the history
...is preceded by whitespace.

Closes #10414.
  • Loading branch information
jgm committed Dec 18, 2024
1 parent 63a949d commit 9acff99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Text/Pandoc/Readers/Textile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ simpleInline border construct = try $ do
attr <- attributes
body <- trimInlines . mconcat <$>
withQuoteContext InSingleQuote
(manyTill (notFollowedBy newline >> inline)
(manyTill (((B.space <>) <$>
(whitespace *> notFollowedBy newline >> inline))
<|> (notFollowedBy newline >> inline))
(try border <* notFollowedBy alphaNum))
return $ construct $
if attr == nullAttr
Expand Down
6 changes: 6 additions & 0 deletions test/command/10414.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```
% pandoc -f textile -t html
from 30.-100. text, inside - after dash
^D
<p>from 30.–100. text, inside - after dash</p>
```

0 comments on commit 9acff99

Please sign in to comment.