HtmlRenderer

zio.blocks.docs.HtmlRenderer
object HtmlRenderer

Renderer for HTML output.

Converts markdown AST elements to HTML5-compliant HTML strings. Provides both full document rendering with DOCTYPE and head/body tags, and fragment rendering for embedding in existing HTML documents.

Attributes

Source
HtmlRenderer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def escape(s: String): String

Escape HTML entities.

Escape HTML entities.

Value parameters

s

The string to escape

Attributes

Returns

String with HTML entities escaped

Source
HtmlRenderer.scala
def render(doc: Doc): String

Render a Doc to a complete HTML5 document.

Render a Doc to a complete HTML5 document.

Value parameters

doc

The document to render

Attributes

Returns

Complete HTML5 document with DOCTYPE, html, head, and body tags

Source
HtmlRenderer.scala
def renderBlock(block: Block): String

Render a Block to its HTML representation.

Render a Block to its HTML representation.

Value parameters

block

The block element to render

Attributes

Returns

HTML string for this block

Source
HtmlRenderer.scala
def renderFragment(doc: Doc): String

Render a Doc to an HTML fragment (content only).

Render a Doc to an HTML fragment (content only).

Value parameters

doc

The document to render

Attributes

Returns

HTML content without DOCTYPE or wrapper tags

Source
HtmlRenderer.scala
def renderInline(inline: Inline): String

Render a single inline element.

Render a single inline element.

Value parameters

inline

The inline element to render

Attributes

Returns

HTML string for this inline

Source
HtmlRenderer.scala
def renderInlines(inlines: Chunk[Inline]): String

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 HTML string

Source
HtmlRenderer.scala