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

Unit test for testing single comment generated by CommentParser class pass in linux and fail in windows #184

Open
moh-hassan opened this issue Dec 12, 2021 · 0 comments · May be fixed by #185

Comments

@moh-hassan
Copy link

moh-hassan commented Dec 12, 2021

For the comment ended by \r\n in windows:

//This is a line comment\r\n      

in Linux, ended by \n

//This is a line comment\n      

The parser capture:
In linux: This is a line comment
In Windows: This is a line comment\r

That is because the line:

from rest in Parse.CharExcept(NewLine).Many().Text()    //NewLine= "\n"

It's best to handle NeLine in CommentParser class for Linux/Windows Environment at Runtime.

moh-hassan added a commit to moh-hassan/Sprache that referenced this issue Dec 14, 2021
@moh-hassan moh-hassan linked a pull request Dec 14, 2021 that will close this issue
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 a pull request may close this issue.

1 participant