Documentation
¶
Overview ¶
Package markdown converts agent-emitted Markdown to HTML for Collibra rich-text attribute fields. Collibra renders RICH_TEXT attributes (e.g. "Definition") as HTML, so Markdown syntax in an LLM's output otherwise displays as raw characters in the UI. The intended caller is a write tool that has already resolved an attribute's stringType to "RICH_TEXT" — plain-string attributes should bypass this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRichTextStringType ¶
IsRichTextStringType reports whether a Collibra attribute type's stringType field signals that the attribute stores HTML. Used by write tools to decide whether to run a value through ToHTML before submitting.
func ToHTML ¶
ToHTML renders s, treated as Markdown, to HTML. An empty input returns an empty string. If goldmark fails (only possible on a writer error, which a bytes.Buffer cannot produce), the original string is returned unchanged so the agent's data is never silently dropped.
Plain text without any Markdown syntax round-trips as a paragraph-wrapped string (e.g. "Hello" → "<p>Hello</p>"); Collibra's UI renders this identically to the bare text, which satisfies the requirement that plain text without Markdown syntax passes through unaffected.
Types ¶
This section is empty.