parent
fe99001d9f
commit
15fa5455e2
1 changed files with 23 additions and 10 deletions
|
@ -573,16 +573,29 @@ parseInline = try $ do
|
||||||
tok <- mtoken
|
tok <- mtoken
|
||||||
case tok of
|
case tok of
|
||||||
MLine lparts -> return $ linePartsToInlines lparts
|
MLine lparts -> return $ linePartsToInlines lparts
|
||||||
MMacro "UR" args -> parseLink args
|
MMacro mname args ->
|
||||||
MMacro "MT" args -> parseEmailLink args
|
case mname of
|
||||||
MMacro "B" args -> parseBold args
|
"UR" -> parseLink args
|
||||||
MMacro "I" args -> parseItalic args
|
"MT" -> parseEmailLink args
|
||||||
MMacro "BI" args -> parseAlternatingFonts [strong, emph] args
|
"B" -> parseBold args
|
||||||
MMacro "IB" args -> parseAlternatingFonts [emph, strong] args
|
"I" -> parseItalic args
|
||||||
MMacro "IR" args -> parseAlternatingFonts [emph, id] args
|
"br" -> return linebreak
|
||||||
MMacro "RI" args -> parseAlternatingFonts [id, emph] args
|
"BI" -> parseAlternatingFonts [strong, emph] args
|
||||||
MMacro "BR" args -> parseAlternatingFonts [strong, id] args
|
"IB" -> parseAlternatingFonts [emph, strong] args
|
||||||
MMacro "RB" args -> parseAlternatingFonts [id, strong] args
|
"IR" -> parseAlternatingFonts [emph, id] args
|
||||||
|
"RI" -> parseAlternatingFonts [id, emph] args
|
||||||
|
"BR" -> parseAlternatingFonts [strong, id] args
|
||||||
|
"RB" -> parseAlternatingFonts [id, strong] args
|
||||||
|
"SY" -> return $ strong $ mconcat $ intersperse B.space
|
||||||
|
$ map linePartsToInlines args
|
||||||
|
"YS" -> return mempty
|
||||||
|
"OP" -> case args of
|
||||||
|
(x:ys) -> return $ B.space <> str "[" <> B.space <>
|
||||||
|
mconcat (strong (linePartsToInlines x) :
|
||||||
|
map ((B.space <>) . linePartsToInlines) ys)
|
||||||
|
<> B.space <> str "]"
|
||||||
|
[] -> return mempty
|
||||||
|
_ -> mzero
|
||||||
_ -> mzero
|
_ -> mzero
|
||||||
|
|
||||||
parseBold :: PandocMonad m => [Arg] -> ManParser m Inlines
|
parseBold :: PandocMonad m => [Arg] -> ManParser m Inlines
|
||||||
|
|
Loading…
Reference in a new issue