Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rianb committed Dec 14, 2023
1 parent 55bb0fe commit ecdb82c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ The parser could also return the text without any formatting information, with t
```rust
let rtf = r#"{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard Voici du texte en {\b gras}.\par}"#;
let tokens = Lexer::scan(rtf);
let text = Parser::new(tokens).to_text();
let document = Parser::new(tokens);
let text = document.to_text();
assert_eq!(text, "Voici du texte en gras.");
```

Expand Down
1 change: 0 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ pub mod tests {
use crate::header::{CharacterSet::*, FontFamily::*, RtfHeader};
use crate::include_test_file;
use crate::lexer::Lexer;
use crate::Token::{CRLF, PlainText};

#[test]
fn parser_simple_test() {
Expand Down

0 comments on commit ecdb82c

Please sign in to comment.