Correctly render nested blockquotes
Closed this issue · 2 comments
Is your feature request related to a problem? Please describe.
test.md
> This is a block quote
>
> > This is the nested quote
>
> This is part of the outer block quote.
Expected:
This is a block quote
This is the nested quote
This is part of the outer block quote.
Actual (You can see that "This is the nested quote" line is not rendered as nested quotes in glow):
glow -s dark test.md
glow -s dracula test.md
Describe the solution you'd like
Correctly render nested blockquotes for at least the dark and dracula themes.
Describe alternatives you've considered
No.
Additional context
None.
In the beginning I was confused because appears that you are testing themes, later I did think that was to show error in different theme outputs.
You're right, there is a bug in the nested blockquotes, I'm gonna put outputs from other CLI tools that do the same as glow
, that is very colorful glowing but has many bugs. You can see here that all of them render your test better than glow and works in terminal.
- Those 3 can show correct md output in terminal with colors:
lowdown is very good, with MANY output options like: html, ms (man), pdf (pdfroff), latex.
mdv good, install withpipx install mdv
: https://github.com/axiros/terminal_markdown_viewer
mdcat simple but correct output, you can pipe into less if you need.
$ lowdown -stterm test.md
| This is a block quote
|
| | This is the nested quote
|
| This is part of the outer block quote.
$ mdv test.md
| This is a block quote
|| This is the nested quote
| This is part of the outer block quote.
$ mdcat test.md
This is a block quote
This is the nested quote
This is part of the outer block quote.
- mdp has correct output, but is purpose is 4 presentations.
$ mdp test.md
This is a block quote
This is the nested quote
This is part of the outer block quotes
- mandown to converting to manual pages (I did try go-md2man, but didn't pass this test):
$ mandown test.md > test.1 ; man ./test.1
test(1) General Commands Manual test(1)
This is a block quote
This is the nested quote
This is part of the outer block quote.
test(1)
- There are many with html output (using a terminal web browser:
w3m
,lynx
)
$ lowdown test.md | w3m -T text/html -dump
This is a block quote
This is the nested quote
This is part of the outer block quote.
$ discount test.md | w3m -T text/html -dump
This is a block quote
This is the nested quote
This is part of the outer block quote.
$ marked --silent test.md | w3m -T text/html -dump
This is a block quote
This is the nested quote
This is part of the outer block quote.
Note: Here I did alias discount='markdown'
because the name is too common.
- Html output (python based):
$ markdown-it test.md | w3m -T text/html -dump
This is a block quote
This is the nested quote
This is part of the outer block quote.
$ markdown_py test.md | w3m -T text/html -dump
This is a block quote
This is the nested quote
This is part of the outer block quote.
There are no answer to Issues here (I did check from December, maybe more times), I also did an Issue ( charmbracelet/glow#555 ) with any comment, h0rv has a fork with 8 commits ahead, not that fix your problem, but there is hope from other people. I hope this post helps you somehow.
issue is in glamour, transferring