markdown

package
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func IsRichTextStringType(stringType string) bool

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

func ToHTML(s string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL