Skip to content

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

@Disonantemus

Description

@Disonantemus
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions