Documentation
¶
Overview ¶
Package markdown provides on-demand CommonMark parsing utilities for OpenAPI description fields. It wraps goldmark to validate markdown structure, render hover previews, and extract structural information from descriptions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
Render converts CommonMark source text to HTML. Useful for hover previews where the editor supports HTML rendering in MarkupContent.
func TranslatePosition ¶
func TranslatePosition(desc openapi.DescriptionValue, goldmarkLine int) protocol.Range
TranslatePosition converts a goldmark 1-based line number into an absolute LSP range using the description's source location and geometry.
func TranslateRange ¶
func TranslateRange(desc openapi.DescriptionValue, line, col, length int) protocol.Range
TranslateRange converts a goldmark position with column and length into a precise absolute LSP range. IndentCols is added to the column to account for block scalar indentation in the source file.