File tree Expand file tree Collapse file tree 2 files changed +62
-1
lines changed
Expand file tree Collapse file tree 2 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ mathInlineWith op cl = try $ do
4242 (try (string " text" >>
4343 ((" \\ text" <> ) <$> inBalancedBraces 0 " " ))
4444 <|> (\ c -> T. pack [' \\ ' ,c]) <$> anyChar))
45- <|> (" \n " <$ blankline <* notFollowedBy' blankline)
45+ <|> (" \n " <$ blankline <* notFollowedBy' blankline <* notFollowedBy (char ' $ ' ) )
4646 <|> (T. pack <$> many1 spaceChar <* notFollowedBy (char ' $' ))
4747 ) (try $ textStr cl)
4848 notFollowedBy digit -- to prevent capture of $5
Original file line number Diff line number Diff line change 1+ ```
2+ % pandoc -f markdown -t native
3+ $ invalid opening inline math$
4+
5+ $
6+ invalid opening inline math$
7+
8+ $invalid closing inline math $
9+
10+ $invalid closing inline math
11+ $
12+
13+ $valid inline math$
14+ ^D
15+ [ Para
16+ [ Str "$"
17+ , Space
18+ , Str "invalid"
19+ , Space
20+ , Str "opening"
21+ , Space
22+ , Str "inline"
23+ , Space
24+ , Str "math$"
25+ ]
26+ , Para
27+ [ Str "$"
28+ , SoftBreak
29+ , Str "invalid"
30+ , Space
31+ , Str "opening"
32+ , Space
33+ , Str "inline"
34+ , Space
35+ , Str "math$"
36+ ]
37+ , Para
38+ [ Str "$invalid"
39+ , Space
40+ , Str "closing"
41+ , Space
42+ , Str "inline"
43+ , Space
44+ , Str "math"
45+ , Space
46+ , Str "$"
47+ ]
48+ , Para
49+ [ Str "$invalid"
50+ , Space
51+ , Str "closing"
52+ , Space
53+ , Str "inline"
54+ , Space
55+ , Str "math"
56+ , SoftBreak
57+ , Str "$"
58+ ]
59+ , Para [ Math InlineMath "valid inline math" ]
60+ ]
61+ ```
You can’t perform that action at this time.
0 commit comments