mdreport

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Overview

Package mdreport renders values into CEM and OCM review-report Markdown safely. Report bodies interpolate repository-derived strings (paths, evidence identifiers) into backtick code spans; those strings are only byte-validated (wire.ValidatePath rejects bytes below 0x20 but allows backticks, "|", and U+2028/U+2029), so a raw interpolation can break out of its code span or, via the Unicode line/paragraph separators, out of its report line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeSpan

func CodeSpan(value string) string

CodeSpan renders value as a single CommonMark inline code span that cannot be broken out of: the backtick fence is one longer than the longest run of consecutive backticks found in value (the CommonMark rule for delimiting a code span around arbitrary content), the fence is padded with a space on each side when value starts or ends with a backtick, and any embedded newline or Unicode line/paragraph separator is replaced with a space so the span cannot spill across report lines.

Types

This section is empty.

Jump to

Keyboard shortcuts

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