parent
8ed33f6662
commit
da57775171
1 changed files with 8 additions and 0 deletions
|
@ -574,6 +574,7 @@ inline = choice [ str
|
|||
, ensureMath
|
||||
, rawLaTeXInline'
|
||||
, escapedChar
|
||||
, emptyGroup
|
||||
, unescapedChar
|
||||
, comment
|
||||
] <?> "inline"
|
||||
|
@ -677,6 +678,13 @@ escapedChar = do
|
|||
result <- escaped (oneOf specialChars)
|
||||
return $ if result == Str "\n" then Str " " else result
|
||||
|
||||
emptyGroup :: GenParser Char st Inline
|
||||
emptyGroup = try $ do
|
||||
char '{'
|
||||
spaces
|
||||
char '}'
|
||||
return $ Str ""
|
||||
|
||||
-- nonescaped special characters
|
||||
unescapedChar :: GenParser Char st Inline
|
||||
unescapedChar = oneOf "`$^&_#{}[]|<>" >>= return . (\c -> Str [c])
|
||||
|
|
Loading…
Add table
Reference in a new issue