Skip to content

Commit

Permalink
Check if supplied FORMAT matches with an HTML slide deck value. Retur…
Browse files Browse the repository at this point in the history
…n True for isRawHtml.
  • Loading branch information
coatless authored and jgm committed Sep 29, 2023
1 parent 11facf7 commit 4d11ea7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Text/Pandoc/Writers/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1731,11 +1731,20 @@ intrinsicEventsHTML4 =
[ "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover"
, "onmouseout", "onmouseout", "onkeypress", "onkeydown", "onkeyup"]


-- | Check to see if Format is valid HTML
isRawHtml :: PandocMonad m => Format -> StateT WriterState m Bool
isRawHtml f = do
html5 <- gets stHtml5
return $ f == Format "html" ||
((html5 && f == Format "html5") || f == Format "html4")
((html5 && f == Format "html5") || f == Format "html4") ||
isSlideVariant f

-- | Check to see if Format matches with an HTML slide variant
isSlideVariant :: Format -> Bool
isSlideVariant f = f `elem` [Format "s5", Format "slidy", Format "slideous",
Format "dzslides", Format "revealjs"]


-- We need to remove links from link text, because an <a> element is
-- not allowed inside another <a> element.
Expand Down

0 comments on commit 4d11ea7

Please sign in to comment.