Closed pythops closed 1 year ago
The problem isn't really with termimad. The problem is your middle line is missing the tab or 4 spaces making it a line of codes.
Possible solutions depending on your case:
\n\
)With code fences:
fn main() {
let code = r#"
```
let x =0;
println!("{}", x);
```
"#;
println!("{}", termimad::MadSkin::default_dark().term_text(code));
}
Thanks for the answer. We can mark this as closed then :)
When I try to render a piece of code that contains a new line in it, I get the new line without any background highlight.
for instance,
this will produce this rendering
as you can see it does not render it in one block.