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 extra newlines in raw strings #944

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

benatkin
Copy link
Contributor

@benatkin benatkin commented Dec 31, 2024

fixes #941

I wonder how it decides to call pos.advance() and pos.newline()

@benatkin
Copy link
Contributor Author

benatkin commented Dec 31, 2024

It looks like it's fine calling pos.advance() and still calling pos.new_line() when it's processing a newline. It corrects from being one past the last character of the line to being the first character of the new line - it doesn't really advance twice, though it wouldn't make a difference if it didn't advance when the character is a newline. AFAIK this PR is ready.

@schungx schungx merged commit 2ed0d0e into rhaiscript:main Dec 31, 2024
@schungx schungx linked an issue Dec 31, 2024 that may be closed by this pull request
@benatkin benatkin deleted the fix-extra-newlines-in-raw-strings branch December 31, 2024 04:01
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.

raw string adds newline before "
2 participants