@tmlmt/cooklang-parser / formatDiagnostics
Function: formatDiagnostics()
formatDiagnostics(
diagnostics,source,label?):string
Convenience wrapper that formats all diagnostics in diagnostics and joins them with a blank line separator.
Parameters
diagnostics
The diagnostics to render.
source
string
The original text returned in DiagnosticError.source or stored on DiagnosticError.source. Span positions refer to this string.
label?
string
Optional label shown in the location marker (default "recipe").
Returns
string
A multi-line plain-text string.