Skip to content
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

Fix a simple html reader bug #872

Merged
merged 2 commits into from
Jul 10, 2022
Merged

Conversation

hunterhector
Copy link
Member

This PR fixes #871.

Description of changes

  1. move collect_span after all the handling of k value, which makes it larger than 0 (should be larger than i).
  2. Also make sure k > i before calling collect_span

Possible influences of this PR.

The output of html_reader is likely to change a bit on wrong tags and some whitespaces.

Test Conducted

  1. Added the test case with incomplete tags

@codecov
Copy link

codecov bot commented Jul 10, 2022

Codecov Report

Merging #872 (08498ed) into master (87ed581) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #872   +/-   ##
=======================================
  Coverage   80.75%   80.75%           
=======================================
  Files         254      254           
  Lines       19373    19370    -3     
=======================================
- Hits        15644    15642    -2     
+ Misses       3729     3728    -1     
Impacted Files Coverage Δ
forte/data/readers/html_reader.py 67.06% <100.00%> (+<0.01%) ⬆️
tests/forte/data/readers/html_reader_test.py 98.76% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87ed581...08498ed. Read the comment docs.

@hunterhector hunterhector merged commit 984e79c into asyml:master Jul 10, 2022
@hunterhector hunterhector deleted the reader branch July 10, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML reader could fail on unfinished tag.
1 participant