3 ms·
> Using Show-Markdown you can take markdown and display it as a VT100 encoded string right in the console. This is an erroneous description (which in fairness
by JdeBP 8y ago
> Using Show-Markdown you can take markdown and display it as a VT100 encoded string right in the console.
This is an erroneous description (which in fairness originated with Aditya Patwardhan of Microsoft not with the author of the headlined article here, who is just parrotting it). As Thomas Dickey points out, VT100s had no notion of multiple colours at all. This is not VT100.
* https://github.com/PowerShell/PowerShell/pull/6926 https://github.com/PowerShell/PowerShell/pull/6926
* https://invisible-island.net/xterm/xterm.faq.html#what_vt220 https://invisible-island.net/xterm/xterm.faq.html#what_vt220
> It just feels… odd.
M. Pleau rightly points out the odd division of labour in the commands, here. Oddly, the conversion command not only generates an abstract syntax tree object, it also (but optionally) renders that AST into HTML or text with ECMA-48+T.416 control sequences. The "show" command then picks one of those two renderings from its input.
A more conventional division of labour would have been one tool to create the AST, another tool (or indeed tools) to render the AST into HTML and ECMA-48+T.416 text, and the usual already existing PowerShell tools to paginate/display HTML and ECMA-48+T.416 text.
(I add T.416, by the way, because the examples include T.416 SGR control sequences for indexed colour. Interestingly, they use it for a reverse video effect, for which there already was an ECMA-48 control sequence: SGR 7/SGR 27.)