PipeScript
PipeScript copied to clipboard
`Out-HTML` should support `$psStyle`
If a formatter uses $psStyle to write output, Out-HTML should convert that style into a css color class (using the conventions established in 4bitcss )
This seems like it might be complicated, but can be simplified radically thru this lens:
$psStyle is already a lookup table
We can think of this problem as:
- Creating a combined regex to search for any of the values in
$psStyle - Writing a
[ScriptBlock]replacer that swaps the value with a<span>
$psStyle.FormatHyperlink can also be thought of this way, if we use it to format a pair of named captures.
If any styles are still set at the end of output, the entire output should be wrapped in an element.