-
-
Notifications
You must be signed in to change notification settings - Fork 129
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: respec special characters inside string #57
Conversation
Awesome! @evilebottnawi do you think its worth opening an issue on the parser repo? Not sure if this is something that should eventually be changed there or not |
@mgrip looks on other parsers https://astexplorer.net/#/gist/070b3c0b39f0af268d909e3ba9efa2a3/2ba4c9d3ab6b3e3cf31f6148a28966c638948790 |
@mgrip i am not familiar with php-parser maybe some option(s) missed? |
Ah got it, that makes sense. In that case I think it just makes sense to do this here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
@@ -11,6 +11,20 @@ const indent = docBuilders.indent; | |||
const hardline = docBuilders.hardline; | |||
const softline = docBuilders.softline; | |||
|
|||
const makeString = util.makeString; | |||
|
|||
function stringEscape(str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you just add a comment explaining why we need to do this? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgrip I think I will first create the problem in php parser, let's wait answer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to push this just with a comment w/ a link to the issue in the parser repo that works for me - that way we dont have to wait for it to get fixed on their end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgrip I think we will do this if we do not receive an answer at the earliest acceptable time
/cc @mgrip @czosel
This will allow you to adapt the prettier in the early stages to understand where improvements are possible, at this time this and |
Def agree. I think we've pretty much been doing this already for the most part but I think it makes sense to formalize a plan going forward |
@evilebottnawi does that mean you're going to get this ready to deploy, to workaround the parser? I think in terms of outstanding issues this is one of the most glaring breaking issues |
@mgrip I do not quite understand, i want just add in |
Yup, sounds good! I was just voicing my desire to get a fix deployed for this, if not in the parser then a work-around on our end 😄 |
Close in favor #136 |
Fixes #29
Why parse by default don't escape special characters 😕