Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Disonantemus opened this issue Jan 7, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Disonantemus
Copy link

  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.

@mrusme mrusme added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants