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

(#276) Fixed dollar sign group replace in vue preprocessor #283

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adamDilger
Copy link

@adamDilger adamDilger commented Feb 14, 2024

replace#specifying_a_string_as_the_replacement

When vue code contained groupings such as $' or $$, the call to "".replace() would treat these as special replacements producing invalid code.

Switching the replacement arg to a function returning the same string skips this logic.

The tests pass, and as this is only removing special functionality I would assume this is a safe change

EDIT: I've also added another commit to this PR which fixes having both a script and a script/setup tags in a SFC

@seanogdev
Copy link

I've applied this as a patch in our repo and this works perfectly, thanks @adamDilger 🙌

@seanogdev
Copy link

@ayusharma @byara Would we be able to get a release for this whenever you guys had a spare moment? 🙏

@adamDilger
Copy link
Author

I've added another bugfix onto this branch/PR, for #218 , as there would have been conflicting changes if these fixes were separated out.

If this is not valid I'm happy to revert and re-PR once the first fix has been merged

@adamkdean
Copy link

I found this issue even when $ exists in a string

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.

3 participants