Skip to content

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