mdless does not render HTML escaped characters
atsaloli opened this issue · 1 comments
atsaloli commented
Hi again,
Is it possible for mdless
to render HTML escaped characters, please? I need to be able to put a pipe into a markdown table.
[root@my-hostname-has-dashes source]# cat /tmp/ex.md
Logical operators (in order of precedence of operation)
| Operator | Description |
|------------|-------------|
| `( )` | Grouper
| `!` | NOT
| `&` or `.` | AND
| | | OR
[root@my-hostname-has-dashes source]# mdless /tmp/ex.md
Logical operators (in order of precedence of operation)
+------------+-------------+
| Operator | Description |
|------------|-------------|
| `( )` | Grouper |
| `!` | NOT |
| `&` or `.` | AND |
| | | OR |
+------------+-------------+
[root@my-hostname-has-dashes source]# pandoc -o /tmp/example.txt /tmp/ex.md
[root@my-hostname-has-dashes source]# cat /tmp/example.txt
Logical operators (in order of precedence of operation)
Operator Description
------------ -------------
`( )` Grouper
`!` NOT
`&` or `.` AND
| OR
[root@my-hostname-has-dashes source]#
You can display a pipe (|) character in a table by using its HTML character code (|).
Pandoc is able to handle this just fine.
ttscoff commented
Pandoc isn't outputting to the terminal. A lot of HTML entities would display poorly in many terminals, and I don't really want to add a whole lookup table to convert them. That's partly just laziness, but it's also a pretty large undertaking for a little command line utility.