Render


Object Hierarchy:

Object hierarchy for Render

Description:

public class Render : RenderBase

Renders markdown content to a Gtk.TextBuffer using a state-based renderer.

Processes markdown blocks and spans, converting them to Pango markup and inserting them into the specified TextBuffer range.

## Entry Points

The Render class provides three public methods for processing content:

- add: Adds text to be parsed and rendered incrementally. Use this for streaming content where you receive chunks over time.

- add_start: Starts a new chunk of content. This resets the parser's internal state and should be called when beginning a new content block. You should call flush before calling this if you've been adding content with add.

- flush: Finalizes the current chunk. Call this before starting a new chunk with add_start to ensure all pending content is processed.

HTML tags embedded in the markdown content are automatically parsed and handled. The parser recognizes HTML tags and creates states for them. You only need to provide opening HTML tags in your content. The renderer automatically handles closing tags when the corresponding state is closed or when flush is called.


Namespace: MarkdownGtk
Package: ollmchat

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class GLib.Object