-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite Loop Issue #18
Comments
Hello @ninoseki, thank you for using rtfparse and for this bug report. Reading the log file in ~/rtfparse/rtfparse.debug.log I found that the error occurs while reading the control word htmlrtf on line 622 (Rich Text Format (RTF) Specification, Version 1.9.1 defines Control Word on page 7). The source file on line 622 has the byte sequence The control word "htmlrtf" has a one-digit parameter "0", and the parameter is delimited by a character other that an ASCII digit, here "S". This "S" marks that the control word has ended at the previous byte. This is not correctly recognized by rtfparse. I will fix this. Meanwhile, a workaround for your document would be to add a space between the 0 and the S: |
Note to self: nothing = named_regex_group("nothing", group(rb""))
...
delimiter = named_regex_group("delimiter", rb"|".join((space, newline, other, nothing, rb"$"))) Needs testing. |
fix: contol word recognition, closes #18
@ninoseki Try the new rtfparse 0.9.0 (it's on PyPI). The issue should be fixed there. If you used rtfparse programmatically, please note that some things in the API were renamed. If you only executed rtfparse from the CLI, not much has changed, except that it uses |
Thanks! |
Hello, first of all, thank you for creating this library.
I found an infinite loop issue. So let me report it.
When taking this file as an input,
starts infinite looping like
The text was updated successfully, but these errors were encountered: