Documentation
¶
Index ¶
- func ConvertMultiLineText(s string, convertDoubleSpaces bool) string
- func EscapeIllegalCharacters(s string, settings *print.Settings) string
- func GenerateIndentation(extra int, settings *print.Settings) string
- func PrintFencedCodeBlock(code string, language string) (string, bool)
- func Sanitize(markdown string) string
- func SanitizeItemForDocument(s string, settings *print.Settings) string
- func SanitizeItemForTable(s string, settings *print.Settings) string
- func SanitizeName(name string, settings *print.Settings) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMultiLineText ¶ added in v0.6.0
ConvertMultiLineText converts a multi-line text into a suitable Markdown representation.
func EscapeIllegalCharacters ¶ added in v0.7.0
EscapeIllegalCharacters escapes characters which have special meaning in Markdown into their corresponding literal.
func GenerateIndentation ¶ added in v0.7.0
GenerateIndentation generates indentation of Markdown headers with base level of provided 'settings.MarkdownIndent' plus any extra level needed for subsection (e.g. 'Required Inputs' which is a subsection of 'Inputs' section)
func PrintFencedCodeBlock ¶ added in v0.8.0
PrintFencedCodeBlock prints codes in fences, it automatically detects if the input 'code' contains '\n' it will use multi line fence, otherwise it wraps the 'code' inside single-tick block. If the fenced is multi-line it also appens an extra '\n` at the end and returns true accordingly, otherwise returns false for non-carriage return.
func SanitizeItemForDocument ¶ added in v0.8.0
SanitizeItemForDocument converts passed 'string to suitable Markdown representation for a document. (including line-break, illegal characters, code blocks etc)
func SanitizeItemForTable ¶ added in v0.8.0
SanitizeItemForTable converts passed 'string' to suitable Markdown representation for a table. (including line-break, illegal characters, code blocks etc)
Types ¶
This section is empty.