Skip to content

Report correct line no.s while showing errors #77 #78

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

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

yash-nisar
Copy link
Contributor

@yash-nisar yash-nisar commented Jul 13, 2018

This occurs due to the method t_text_end in the
file lexers\tagvalue.py. The line t.value.count('\n')
doesn't detect newlines because the earlier line is stripped
of whitespaces and newlines. This issue is resolved by first
counting the no. of newline chars and then stripping
whitespaces and newlines so information is preserved.

Signed-off-by: Yash Nisar [email protected]

Closes #77

This occurs due to the method `t_text_end` in the
file `lexers\tagvalue.py`. The line `t.value.count('\n')`
doesn't detect newlines because the earlier line is stripped
of whitespaces and newlines. This issue is resolved by first
counting the no. of newline chars and then stripping
whitespaces and newlines so information is preserved.

Signed-off-by: Yash Nisar <[email protected]>
@pombredanne
Copy link
Member

Simple and neat with a test and LGTM... merging1

@pombredanne pombredanne merged commit d4d1829 into spdx:master Aug 6, 2018
@yash-nisar yash-nisar deleted the incorrect-line-nos branch August 6, 2018 17: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.

Incorrect line numbers reported when errors are emitted
2 participants