Repository navigation
v1.33.3
Highlights
mask/markdownnow reads the tables of GitHub Flavored Markdown, which GitHub and themarkdownblocks of Slack both render. A pair of backticks in two cells of a row no longer hides a<secret:NAME>or<redacted>between them as code, so a placeholder there is escaped and shows on the page.- In a table, a
|in the name of a placeholder is escaped, so that it does not end the cell.
Nothing changes in workflows or in the probe command. The fix reaches a page once the action that posts it, such as github-notes or slack, is built with this release.
Placeholders in Tables
Escape leaves a placeholder in code as it is, since code shows it as written. It used to find code as a CommonMark paragraph has it, where a code span goes from a backtick in one cell to a backtick in the next. A table cuts its row into cells first, so those backticks open no span, and the placeholder between them was posted as an HTML tag, which GitHub leaves out:
| Step | Value |
|---|---|
| login | `token <secret:API_TOKEN> sent` |
| `x | <redacted> | y` | z |Escape(s, markdown.AsEntity) now writes the last row as
| `x | <redacted> | y` | z |and markdown.AsCode as
| `x | ``<redacted>`` | y` | z |The placeholder in the code span of the login cell is left as it is, as before.
A | in the name of a placeholder, such as <secret:A|B>, is escaped as \| in a table: in the code span AsCode writes, and in a code span of the cell the placeholder is in already, where a | would end the cell and the span with it.
For library users
markdown.Escape returns the text above for a table. Its signature and its output for text without tables are unchanged. The package now enables goldmark's table extension.
Changelog
- a9814ca Escape a | as a table reads it, every one in a span the action writes
- a6affcd Escape a | of a name in a code span of a table cell
- 6542291 Merge pull request #513 from mozership/fix/markdown-tables
- aa0da7f Parse a name as its | is written out, and a code span over a |
- 365b632 Read the tables of GitHub Flavored Markdown in finding the code of a note