Repository navigation
fix(config state): print table cells literally instead of as markdown - #4780
Merged
Merged
Conversation
`render_data_table` joined cells with ` | ` and sent the result through the help-text markdown path, so a `|` in a var value or summary subject split the row into an extra column, `*`/`` ` `` restyled it, `[x](y)` lost its URL, and a line break ended the table. Escape the characters minimad interprets, flatten line breaks, and skip the help-text link stripping and `\|` unescaping for data tables.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tables in
wt config state getrendered their cells as markdown, so user data could break them.render_data_tablejoined cells with|and passed the lines through the help-text table path. A var set withwt config state vars set 'note=a | b [x](http://y) `c`'printed as:The
|opened an extra column, the link lost its URL, and the backticks became dim styling. A multi-line var value (allowed, and covered by an existing test) ended the table at its line break. Summary subjects and branch names reach the same tables.minimad, termimad's parser, honours backslash escapes for
|,*,~,`and\. Cells are now escaped with those, line breaks become spaces, and data tables skip the help-text link stripping and\|unescaping. The same value now prints asa | b [x](http://y) `c`. Help-text tables are unchanged.test_render_data_table_cells_are_literalcovers|,*, backticks,\, a link and a line break; it failed before the change. The existingrender_data_tabletests and theconfig_stateintegration snapshots pass unchanged.Found by the nightly survey.