mirror of
https://github.com/YGGverse/ggemtext.git
synced 2026-03-31 09:05:32 +00:00
add trait example
This commit is contained in:
parent
92e1557c9c
commit
0c6ba0c87c
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
|
@ -32,6 +32,8 @@ for line in gemtext.lines() {
|
|||
|
||||
##### Inline
|
||||
|
||||
**Struct**
|
||||
|
||||
``` rust
|
||||
use ggemtext::line::code::Inline;
|
||||
match Inline::from("```inline```") {
|
||||
|
|
@ -40,6 +42,14 @@ match Inline::from("```inline```") {
|
|||
}
|
||||
```
|
||||
|
||||
**Trait**
|
||||
|
||||
``` rust
|
||||
use ggemtext::line::code::inline::Gemtext;
|
||||
assert_eq!("```inline```".as_value(), Some("inline"))
|
||||
assert_eq!("inline".to_source(), "```inline```")
|
||||
```
|
||||
|
||||
##### Multiline
|
||||
|
||||
``` rust
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue