Open bradwood opened 4 years ago
I don't think there's currently a solution.
This looks like a good idea to support this. I'll have a look (but not immediately).
i found a crate called indented
and was going to try that. The alternative (hacky) solution is to just do a regex replacement of \n
with \n<space><space><space>
...
What do you think?
I ended up using this:
https://docs.rs/textwrap/0.11.0/src/textwrap/indentation.rs.html#50-60
Hi,
Is there a way to print rendered markdown to the terminal with everything indented, say a few spaces? I don't want to use an alternate screen, or scrollable frame, just the text printed directly to the terminal.
This is what I have so far:
This renders the text 6 characters narrower than the terminal width, now all I need to do is figure out how to indent this by 3 characters..
Any help is much appreciated. Thanks.