-
-
Notifications
You must be signed in to change notification settings - Fork 17
Fix crashes while reading USFM #333
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #333 +/- ##
=======================================
Coverage 72.22% 72.22%
=======================================
Files 414 414
Lines 35154 35169 +15
Branches 4865 4871 +6
=======================================
+ Hits 25389 25401 +12
- Misses 8674 8676 +2
- Partials 1091 1092 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- properly handle verse 0 - ignore private-use markers - fixes #329
3a4450e to
6fc66e4
Compare
Enkidu93
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Enkidu93 reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion
src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs line 71 at r2 (raw file):
if (state.VerseRef.Equals(_curVerseRef) && !_duplicateVerse) { if (state.VerseRef.VerseNum > 0)
Could we use state.IsVerseText instead?
ddaspit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @Enkidu93)
src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs line 71 at r2 (raw file):
Previously, Enkidu93 (Eli C. Lowry) wrote…
Could we use
state.IsVerseTextinstead?
This issue is specifically about the case where there is a \v 0 marker.
Enkidu93
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to put in a PR for the new Machine version or should I?
@Enkidu93 reviewed 1 of 2 files at r2.
Reviewable status: 1 of 2 files reviewed, all discussions resolved
src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs line 71 at r2 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
This issue is specifically about the case where there is a
\v 0marker.
OK, I was just thinking since the first thing IsVerseTextchecks is
if (VerseRef.VerseNum == 0)
return false;
...
we could use it, but maybe that doesn't make as much sense semantically as I thought when I left the comment 😅.
Enkidu93
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, all discussions resolved
ddaspit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddaspit reviewed 1 of 2 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ddaspit)
This change is