-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi! I was trying to implement the parser in my program and was testing with RTF files exported from different sources (MS word, Google Docs,...). I found the parser seems to be ignoring the spaces between words from Google Docs exported ones (Sample Text.rtf.zip). When printing out it'd be: Loremipsumodoramet, consectetueradipiscingelit. ..., but it should be Lorem ipsum odor amet, consectetuer adipiscing elit. ....
Also attaching how it looks like in my local text editor(Mac) which has the correct spaces: 
Code I'm using to parse:
fn main() {
let rtf_text = include_str!("Sample Text.rtf");
let tokens = Lexer::scan(rtf_text).expect("Invalid RTF content");
let doc = Parser::new(tokens).parse();
println!("{}", doc.unwrap().get_text());
}Would there be a way that I could preserve the spaces in this case?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels