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 an error in the AbbreviationParser. #836

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

snnz
Copy link
Contributor

@snnz snnz commented Dec 18, 2024

The modified end of the previous literal is assigned to the literal next to abbrevion. The test of the abbreviations in TestSourcePosition.cs passes only because there is an abbreviation at the end of the string, and thus no literal remains after it. But add some literals after the abbreviation, say, a period '.', and instead of expected literal with the span 103-103 there will be one with the end less then the start (103-98).

@xoofx
Copy link
Owner

xoofx commented Dec 18, 2024

But add some literals after the abbreviation, say, a period '.', and instead of expected literal with the span 103-103 there will be one with the end less then the start (103-98).

Could you modify the said test to surface this problem and we have a coverage for this?

@snnz
Copy link
Contributor Author

snnz commented Dec 18, 2024

I've added a paragraph with the abbreviation at the start of the line. It gives "literal (4,4) 111-106" in the current version.

@xoofx xoofx merged commit 733c028 into xoofx:master Dec 19, 2024
1 check passed
@xoofx xoofx added the bug label Dec 19, 2024
@snnz snnz deleted the fix-abbreviation branch December 19, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants