Verified Commit da639d5c authored by Camil Staps's avatar Camil Staps 🚀

Fix issue with code containing < and >

parent 74a2edc9
Pipeline #14676 failed with stage
in 55 seconds
......@@ -106,7 +106,7 @@ where
where
html dtd = collapsable thisfp "typedef" ("td-" +++ dtd.name) dtd.name dtd.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dtd.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Html (fromJust dtd.repr)]
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust dtd.repr)]
]
classes = if (isEmpty m.elem.mod_classes) []
......@@ -116,7 +116,7 @@ where
where
html dc = collapsable thisfp "class" ("class-" +++ dc.name) dc.name dc.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dc.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Html (fromJust dc.repr)]
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust dc.repr)]
]
generics = if (isEmpty m.elem.mod_generics) []
......@@ -126,7 +126,7 @@ where
where
html dg = collapsable thisfp "generic" ("gen-" +++ dg.name) dg.name dg.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dg.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Html (fromJust dg.repr)]
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust dg.repr)]
]
functions = if (isEmpty m.elem.mod_functions) []
......@@ -136,7 +136,7 @@ where
where
html df = collapsable thisfp "function" ("fun-" +++ df.name) df.name df.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< df.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Html (fromJust df.repr)]
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust df.repr)]
]
macros = if (isEmpty m.elem.mod_macros) []
......@@ -146,7 +146,7 @@ where
where
html dm = collapsable thisfp "macro" ("macro-" +++ dm.name) dm.name dm.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dm.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Html (fromJust dm.repr)]
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust dm.repr)]
]
collapsable :: !FilePath !String !String !String !ElementPosition !a -> HtmlTag | html a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment