TikiWiki: support underlined text
This commit is contained in:
parent
7e6ccda6d9
commit
2200b9c8ff
3 changed files with 15 additions and 7 deletions
|
@ -523,14 +523,9 @@ colored = try $ do
|
||||||
string "~~"
|
string "~~"
|
||||||
return $ B.str $ " NOT SUPPORTED: ~~ (colored) BEGIN: ~~" <> inner <> "~~ :END "
|
return $ B.str $ " NOT SUPPORTED: ~~ (colored) BEGIN: ~~" <> inner <> "~~ :END "
|
||||||
|
|
||||||
-- UNSUPPORTED, as there doesn't seem to be any facility in calibre
|
-- ===underlined===
|
||||||
-- for this
|
|
||||||
underlined :: PandocMonad m => TikiWikiParser m B.Inlines
|
underlined :: PandocMonad m => TikiWikiParser m B.Inlines
|
||||||
underlined = try $ do
|
underlined = try $ B.underline <$> enclosed (string "===") nestedInlines
|
||||||
string "==="
|
|
||||||
inner <- fmap T.pack $ many1 $ noneOf "=\n"
|
|
||||||
string "==="
|
|
||||||
return $ B.str $ " NOT SUPPORTED: ==== (underlined) BEGIN: ===" <> inner <> "=== :END "
|
|
||||||
|
|
||||||
-- UNSUPPORTED, as there doesn't seem to be any facility in calibre
|
-- UNSUPPORTED, as there doesn't seem to be any facility in calibre
|
||||||
-- for this
|
-- for this
|
||||||
|
|
|
@ -99,6 +99,13 @@ Pandoc
|
||||||
, Str "emph"
|
, Str "emph"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
, Header
|
||||||
|
1
|
||||||
|
( "other-inlines" , [] , [] )
|
||||||
|
[ Str "other" , Space , Str "inlines" ]
|
||||||
|
, Para
|
||||||
|
[ Underline [ Str "underlined" , Space , Str "text" ] ]
|
||||||
|
, Para [ Strikeout [ Str "strikeout" ] ]
|
||||||
, Header
|
, Header
|
||||||
1
|
1
|
||||||
( "horizontal-rule" , [] , [] )
|
( "horizontal-rule" , [] , [] )
|
||||||
|
|
|
@ -28,6 +28,12 @@ __strong with ''emph''__
|
||||||
|
|
||||||
''__strong inside__ emph''
|
''__strong inside__ emph''
|
||||||
|
|
||||||
|
! other inlines
|
||||||
|
|
||||||
|
===underlined text===
|
||||||
|
|
||||||
|
--strikeout--
|
||||||
|
|
||||||
! horizontal rule
|
! horizontal rule
|
||||||
|
|
||||||
top
|
top
|
||||||
|
|
Loading…
Reference in a new issue