elifesciences / decision-letter-parser

Parse docx file containing decision letter and author response content and produce output in other formats
MIT License
0 stars 0 forks source link

Fix new line break for italic tag on its own line. #109

Closed gnott closed 3 years ago

gnott commented 3 years ago

Re bug issue https://github.com/elifesciences/issues/issues/6581

eLife article 64740 decision letter had a bug parsing an author response editor comment paragraph containing inline formulae. The cause looked like due to a new line character prior to the italic paragraph was not considered to be a paragraph break in the decision letter parser logic, and as a result the italic paragraph was appended to the previous paragraph's content.

The code fix in this PR is in the utils.py module, and then there are some additional test scenarios added related to the bug. In addition, some tests for the match_disp_quote_content() function are a bonus, since as part of the troubleshooting process, it was tested more extensively.

There are no backwards compatibility problems anticipated in this PR, it is a bug fix only.