Proper escaping for string literals#1360
Open
netfri25 wants to merge 5 commits into
Open
Conversation
Author
|
this is also a fix for #84, but more general (every string literal instead of just label text) |
w-lfchen
reviewed
Aug 10, 2025
w-lfchen
left a comment
Contributor
There was a problem hiding this comment.
i feel like this pr should include switching the escaping crate, see #1194.
i might pick that pr up at some point with an actual implementation but i've lost the energy, time and motivation to work on eww as of writing.
just thought i should point this out because it seemed relevant
this is the crate i've used: [unescaper](https://crates.io/crates/unescaper)
Author
|
this wasn't hard to implement, so I've just done it myself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Applies unescaping for string literals in the lexer.
No things have been added to implement this, since it makes use of the
unescapecrate that was used in a different place.Usage
"next line\ntabbed\tspace using hex code\x20"
Checklist
docs/content/maindirectory has been adjusted to reflect my changes.cargo fmtto automatically format all code before committing