Documentation
¶
Overview ¶
Package markdown writes the placeholders Probe puts in place of hidden values so that Markdown shows them, where <secret:NAME> and <redacted> would be taken for something else: an HTML tag on GitHub, which leaves it out, or a link or a mention on Slack. Actions reach it through sdk/markdown.
It is a package of its own, apart from the masking the sdk package links, so that only an action that writes Markdown carries the Markdown parser it reads the text with.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Escape ¶
Escape returns s, a Markdown text such as the body of a note, with each placeholder outside code written as style says, so that a reader sees where a value was hidden. A placeholder in a code block or a code span is shown as it is, so it is left alone there. The code of s is found as a CommonMark parser finds it, with its blocks, quotes, lists and headings, and the tables of GitHub Flavored Markdown.
A backslash right before a placeholder is escaped, so that it does not escape what is written in its place. With AsEntity, what the placeholder names is written as text, so that a & or a * in the name of a secret is not read as an entity or as emphasis. With AsCode, a placeholder is put in a span of a number of backticks no run of s has, so that no backtick left unmatched before it can close the span, and it is kept apart by a space from a backtick or another placeholder right next to it, whose backticks would make one run with those of its span. In a table row, a | of the name is escaped too, so that it does not end the cell.