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

Fixed token position zero in text module #1949

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

TwoOfTwelve
Copy link
Contributor

This fixed #1903

The error occurred because of the way the token position is calculated. It is calculated as the difference of the position of the first character of the token and the position of the last line break before that. To make this work the index of the last line break needs to be exactly 1 smaller than the first character in the line. Therefore for the first line the index must be -1, it was 0. Therefore the first token had it's position calculated as 0 - 0 which resulted in 0.

@TwoOfTwelve TwoOfTwelve requested a review from tsaglam August 28, 2024 18:18
Copy link

@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Aug 29, 2024
@tsaglam tsaglam merged commit 0a868f2 into develop Aug 29, 2024
44 checks passed
@tsaglam tsaglam deleted the feature/textModuleTokenPositionZero branch August 29, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants