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 hOCR end-of-line whitespace handling #36

Merged
merged 1 commit into from
Aug 5, 2020
Merged

Fix hOCR end-of-line whitespace handling #36

merged 1 commit into from
Aug 5, 2020

Conversation

jbaiter
Copy link
Member

@jbaiter jbaiter commented Aug 5, 2020

hOCR lines that don't end on hyphenation now end correctly with a newline character in their last span's text.
Additionally, this commit improves whitespace rendering by setting the CSS white-space option to pre. This removes the ugly gaps between text-spans when selecting text.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2020

Codecov Report

Merging #36 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   70.25%   70.24%   -0.02%     
==========================================
  Files          11       11              
  Lines         659      662       +3     
  Branches      198      199       +1     
==========================================
+ Hits          463      465       +2     
- Misses        165      166       +1     
  Partials       31       31              
Impacted Files Coverage Δ
src/components/PageTextDisplay.js 95.83% <ø> (ø)
src/lib/ocrFormats.js 93.03% <100.00%> (-0.52%) ⬇️

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 224e1b4...1a717af. Read the comment docs.

hOCR lines that don't end on hyphenation now end correctly with a
newline character in their last span's text. Additionally, this commit
improves whitespace rendering by setting the CSS `white-space` option to
`pre`. This removes the ugly gaps between text-spans when selecting
text.
@stefan-it stefan-it merged commit da16617 into master Aug 5, 2020
@stefan-it stefan-it deleted the whitespace branch August 5, 2020 15:59
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.

3 participants