silvermine / php-rtflex

A pure PHP lexer / tokenizer for RTF files
MIT License
9 stars 9 forks source link

Convert \par to newline #1

Open tasso85 opened 10 years ago

tasso85 commented 10 years ago

The classes seem to do they're job pretty well, however when you call extractText() the \par controls should be converted to newlines, they just seem to be discarded instead.

jthomerson commented 9 years ago

@tasso85 thanks for the report. Sorry we didn't see and respond to this sooner, but could you please provide a test case with your report? Or, if you feel like providing one, we would be happy to review a pull request that adds a unit test for this (and even better, a fix if you'd like).

nekromoff commented 8 years ago
str_replace('\par',"\n",$text);
derUli commented 7 years ago

@nekromoff I have the same issue. where should i insert this?

nekromoff commented 7 years ago

@derUli Sorry, I stopped using this as it was unreliable.

I ended using this instead: https://gist.github.com/ngugijames/9e9a5842f2d57ec944b1 http://webcheatsheet.com/php/reading_the_clean_text_from_rtf.php Worked better for me.