Allow spaces after \(
and before \)
with tex_math_single_backslash
.
Previously `\( \frac{1}{a} < \frac{1}{b} \)` was not parsed as math in `markdown` or `html` `+tex_math_single_backslash`.
This commit is contained in:
parent
82bcda80c6
commit
97efed8c23
1 changed files with 2 additions and 2 deletions
|
@ -586,7 +586,7 @@ uri = try $ do
|
|||
mathInlineWith :: Stream s m Char => String -> String -> ParserT s st m String
|
||||
mathInlineWith op cl = try $ do
|
||||
string op
|
||||
notFollowedBy space
|
||||
when (op == "$") $ notFollowedBy space
|
||||
words' <- many1Till (count 1 (noneOf " \t\n\\")
|
||||
<|> (char '\\' >>
|
||||
-- This next clause is needed because \text{..} can
|
||||
|
@ -600,7 +600,7 @@ mathInlineWith op cl = try $ do
|
|||
return " "
|
||||
) (try $ string cl)
|
||||
notFollowedBy digit -- to prevent capture of $5
|
||||
return $ concat words'
|
||||
return $ trim $ concat words'
|
||||
where
|
||||
inBalancedBraces :: Stream s m Char => Int -> String -> ParserT s st m String
|
||||
inBalancedBraces 0 "" = do
|
||||
|
|
Loading…
Reference in a new issue