unison-share-api-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Server.Doc.AsHtml

Description

Render Unison.Server.Doc and embedded source to Html

Synopsis

Documentation

inlineCode :: [Text] -> Html () -> Html () Source #

codeBlock :: [Attribute] -> Html () -> Html () Source #

data IsFolded Source #

Constructors

IsFolded Bool [Html ()] [Html ()] 
Disabled (Html ()) 

mergeWords :: Text -> [Doc] -> [Doc] Source #

Merge adjacent Word elements in a list to 1 element with a string of words separated by space— useful for rendering to the dom without creating dom elements for each and every word in the doc, but instead rely on textNodes

toText :: Text -> Doc -> Text Source #

Merge down Doc to Text by merging Paragraphs and Words. Used for things like extract an src of an image. I.e something that has to be a Text and not a Doc

h :: Nat -> Text -> Html () -> Html () Source #

Unison Doc allows endlessly deep section nesting with titles, but HTML only supports to h1-h6, so we clamp the sectionLevel when converting

badge :: Html () -> Html () Source #