reader icon indicating copy to clipboard operation
reader copied to clipboard

[BUGS] 1. Bad output in a edge case, 2. Bad output with extra backslash

Open Disonantemus opened this issue 6 months ago • 0 comments

  1. Three asterisks alone (edge case) bad rendered
$ reader https://readhive.org/series/38553/0/ | sed -n 25p
\\\\\\*

$ reader -o https://readhive.org/series/38553/0/ | sed -n 21p
\\*\\*\\*

$ reader -o https://readhive.org/series/38553/0/ | sed -n 21p | lowdown | w3m -T text/html -dump
\\\*

$ reader -o https://readhive.org/series/38553/0/ | sed -n 21p | glow
\\\\\\*

$ ### firefox (default, output centered):
***

$ ### firefox (reader view):
***

$ ### reader -o (output to github "GFM"):
\\*\\*\\*
  • reader (default pretty output) bad render [BUG].
  • reader --markdown-output (raw markdown output) bad render [BUG].
  • glow, lowdown, github render raw markdown output from reader, is going to be bad.
  • Both firefox and firefox reader view show correct render.
  • I don't know why, but appears that default reader output add some lines vs raw markdown output, that is why I need to change the line with sed.

When the web page has a line with only 3 consecutive asterisks (***), the markup code should displays an horizontal line, but in this case, it should have at least one escape character \ (backslash) before, so that it is displayed correctly. Below are three correct ways to write that will be displayed good, the last one is incorrect (horizontal line) and can optionally be written as ---:

$ echo '\***' | lowdown
<p>***</p>
$ echo '\*\**' | lowdown
<p>***</p>
$ echo '\*\*\*' | lowdown
<p>***</p>
$ echo '***' | lowdown
<hr/>
  1. Extra unnecessary (and problematic) backslash, escaping square brackets
$ reader https://readhive.org/series/38553/0/ | sed -n 48p
\[… There is no end in sight.\]

$ reader -o https://readhive.org/series/38553/0/ | sed -n 41p
\[… There is no end in sight.\]

$ reader -o https://readhive.org/series/38553/0/ | sed -n 41p | lowdown | w3m -T text/html -dump
[… There is no end in sight.]

$ reader -o https://readhive.org/series/38553/0/ | sed -n 41p | glow
\[… There is no end in sight.\]

$ ### firefox (default, output centered):
[… There is no end in sight.]

$ ### firefox (reader view):
[… There is no end in sight.]

$ ### reader -o (output to github):
[… There is no end in sight.]
  • reader (default pretty output) shouldn't show \ (backslash) [BUG]
  • glow output shouldn't show \ (backslash) [glow BUG]
  • reader --markdown-output (raw markdown output) can show \ (backslash), because all except glow render it without backslash, but is unnecessary, also tested with dingus and commonmark that are reference 4 specification.

Disonantemus avatar Jan 07 '24 22:01 Disonantemus