gyscos / gyscos/cursive

Add custom markup language

Open
#188 3 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

In order to give styled string to a `TextView`, we can currently parse Markdown text, which only supports bold and italic effects.

It would be nice to have another markup language available, supporting:
* Effects: bold, italic, underline, inverted-color
* Colors: foreground, background

We may take inspiration from existing languages like BBCode or others.

Possible languages:

* BBCode-inspired with extension for background color
```
[b]Bold and [i]italic[/i] text![/b]
[color="red"]Red text [background=#123456]with background color![/background][/color]
```

* HTML subset (but which subset?)
```html
Bold and italic text! Or using different tags?
Red text with background color!
```

* LateX-inspired

```latex
\bold{Bold and \italic{italic} text!}
\color{red}{Red text! with \colorbox{#123456}{background color!}}
```

* Other?

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.