Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow to add quotes into stringLiteral parameters #122

Closed
supakonoha opened this issue Apr 10, 2023 · 2 comments · Fixed by #124
Closed

Allow to add quotes into stringLiteral parameters #122

supakonoha opened this issue Apr 10, 2023 · 2 comments · Fixed by #124
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@supakonoha
Copy link

supakonoha commented Apr 10, 2023

Is your feature request related to a problem? Please describe.
I'm using a custom tag that has a string parameter. If this parameter includes a quote, this is interpreted as final quote for the parameter, although it's escaped. For example:

#tag("value", "this is a \"custom\" parameter")

for the second parameter, LeafLexer parses it as this is a \ instead of this is "custom" parameter

Describe the solution you'd like
I would like to allow quotes inside parameters using escape characters or other option.

@supakonoha supakonoha added the enhancement New feature or request label Apr 10, 2023
@0xTim 0xTim added bug Something isn't working help wanted Extra attention is needed labels Apr 11, 2023
@roya1v
Copy link
Contributor

roya1v commented May 13, 2023

As far as I see when we read a string we do not distinguish between quotes that were and were not escaped.
That's why I looked at escaping them using a different character and create a draft #124 of how it could work escaping it like $\ but it should work with any other character too.
Let me know what you think!

@supakonoha
Copy link
Author

supakonoha commented May 13, 2023

Looks nice!!!!! Thanks for this change!!!!

Just a suggestion, I don't know if we could define "$" as constant or add into Character extension like quote?

@0xTim 0xTim linked a pull request Jun 13, 2023 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants