ttscoff/mdless

Code Block rendering shows additional newlines if code block is indented too much

jayb-g opened this issue · 2 comments

jayb-g commented

Example:

5 Indents - Markdown(from sublime text):
Screenshot from 2023-08-17 17-59-46

Rendered by mdless:
Screenshot from 2023-08-17 18-00-18

1 indent, same code:
Screenshot from 2023-08-17 18-02-51

Rendered by mdless:
Screenshot from 2023-08-17 18-02-32

Expected behavior is that the last screenshot above is how it should render regardless of number of indents.

I have a feeling that it might be related to #88, although both the above tests are done with full screen terminal only.

jayb-g commented

@ttscoff
I think the problem is that the tool takes terminal width as default wrap width. The code block should be rendered indented appropriately and as you mentioned, shouldn't leak into next line.