Renderer
zio.blocks.docs.Renderer
object Renderer
Renderer for GitHub Flavored Markdown.
Converts markdown AST elements back to GFM-compliant markdown strings. The rendered output can be re-parsed to produce an equivalent AST.
Attributes
- Source
- Renderer.scala
- Graph
-
- Supertypes
- Self type
-
Renderer.type
Members list
Value members
Concrete methods
Render a Doc to a GitHub Flavored Markdown string.
Render a Doc to a GitHub Flavored Markdown string.
Value parameters
- doc
-
The document to render
Attributes
- Returns
-
GFM markdown string
- Example
-
val doc = Doc(Chunk( Heading(HeadingLevel.H1, Chunk(Text("Hello"))) )) val markdown = Renderer.render(doc) // markdown == "# Hello\n" - Source
- Renderer.scala
Render a Block to its GFM representation.
Render a Block to its GFM representation.
Value parameters
- block
-
The block element to render
Attributes
- Returns
-
GFM markdown string for this block
- Source
- Renderer.scala
Render a single inline element.
Render a single inline element.
Value parameters
- inline
-
The inline element to render
Attributes
- Returns
-
GFM markdown string for this inline
- Source
- Renderer.scala
Render a chunk of inlines as a single string.
Render a chunk of inlines as a single string.
Value parameters
- inlines
-
The inline elements to render
Attributes
- Returns
-
Concatenated GFM markdown string
- Source
- Renderer.scala
In this article