gyscos / gyscos/cursive

Documentation does not describe how to use Markdown feature

Open
#808 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

Cursive does have a `markdown` feature flag, but it is not documented how to display Markdown e.g. in a TextView.

There is also no example code.

This is what I have come up with so far:

``` rust
use cursive::utils::markup::markdown::parse;

let content = parse(include_str!("LICENSE.md"));
// `content` is a `SpannedString` with styles, I can see that when I dump it
let text_view = TextView::new(content)
.scrollable()
[...]
```

The output is not styled, it is rather garbled, as it strips newlines, see screenshot: The '## Overview' heading should really start on a new line.

Screenshot 2025-01-09 at 14 54 21

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.