[palette-] prevent interpretation of markup in go-col-name#2959
[palette-] prevent interpretation of markup in go-col-name#2959midichef wants to merge 3 commits intosaulpw:developfrom
Conversation
to match how longnames are bolded in inputLongname
Fixes a bug where go-col-name would interpret text as markup in column names and in cell contents. For go-col-name, turns off bold display of the column name, because drawing it in bold would also cause nonmarkup substrings like "[:5]" to be interpreted as markup.
|
Hmm. Turning off formatting in What would be a good way to escape visidata markup? |
|
Perhaps we can escape vd markup by wrapping every open bracket If this works, I would discard the changes in f19d7ba and change |
|
Oof, that escape might work, but it feels like it's overmuch for the task at hand. What if we injected non-displaying ASCII (or unicode) characters to mark the start/end of literal text? Like this from
This 'literal' usage would be the exact opposite of its intent, but otherwise these characters seem to have the right vibe. Otherwise we could coopt some underused ASCII control characters like 14/15 (Shift Out/Shift In). What do you think about this approach? |
|
Sure, using the Unicode interlinear annotation characters seems like a good solution. The resulting escaped strings will be shorter. However, since it requires changing |
The palette choosers for
&+andgchave some minor display inconsistencies with the way longnames are displayed inexec-longname. The first two commits in this PR fix those inconsistencies.The third commit fixes a bug in
gcwhere a column name had markup interpreted, so 'Customer[:5]' was shown asCustomer, and cell contents had markup interpreted, so a cell of[:bold]asdf[/]was drawn asasdfin bold. However, to properly display the column name as a literal with no markup, I had to turn off the bolding of the column name that was just added in the first commit (40d4243).