Canop / Canop/termimad

Question: Indented output to terminal?

Open
#20 3 comments 1 reaction 1 assignee Claimed by @Canop View on GitHub
enhancement
Dominant language
Rust
Stars
1.2k
Forks
47
Avg merge
3d 16h
Merged PRs (30d)
1

Description

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:
```rust
let desc_text = i.description.unwrap();
let mut area = Area::full_screen();
area.pad(6,0);
let md = skin.area_text(desc_text.as_str(), &area);
print!("{}", &md);
```
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.