TikiWiki: support underlined text

This commit is contained in:
Albert Krewinkel 2022-06-10 11:29:00 +02:00
parent 7e6ccda6d9
commit 2200b9c8ff
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
3 changed files with 15 additions and 7 deletions

View file

@ -523,14 +523,9 @@ colored = try $ do
string "~~"
return $ B.str $ " NOT SUPPORTED: ~~ (colored) BEGIN: ~~" <> inner <> "~~ :END "
-- UNSUPPORTED, as there doesn't seem to be any facility in calibre
-- for this
-- ===underlined===
underlined :: PandocMonad m => TikiWikiParser m B.Inlines
underlined = try $ do
string "==="
inner <- fmap T.pack $ many1 $ noneOf "=\n"
string "==="
return $ B.str $ " NOT SUPPORTED: ==== (underlined) BEGIN: ===" <> inner <> "=== :END "
underlined = try $ B.underline <$> enclosed (string "===") nestedInlines
-- UNSUPPORTED, as there doesn't seem to be any facility in calibre
-- for this

View file

@ -99,6 +99,13 @@ Pandoc
, Str "emph"
]
]
, Header
1
( "other-inlines" , [] , [] )
[ Str "other" , Space , Str "inlines" ]
, Para
[ Underline [ Str "underlined" , Space , Str "text" ] ]
, Para [ Strikeout [ Str "strikeout" ] ]
, Header
1
( "horizontal-rule" , [] , [] )

View file

@ -28,6 +28,12 @@ __strong with ''emph''__
''__strong inside__ emph''
! other inlines
===underlined text===
--strikeout--
! horizontal rule
top