Skip to content

Conversation

@lawvs
Copy link
Contributor

@lawvs lawvs commented Dec 13, 2024

@WebReflection
Copy link
Owner

How bizarre… I completely forgot about it, nice catch but split join feels unnecessarily expensive? Although I’m not sure doubling $ in text content would be faster or better, have you tried that? 🤔 all $\S should become $$\S

@WebReflection
Copy link
Owner

Another way could be using a one-off arrow that should not have special meanings 🤔

@lawvs
Copy link
Contributor Author

lawvs commented Dec 14, 2024

Another way could be using a one-off arrow that should not have special meanings 🤔

I created a simple bench, and the results show that replace indeed has better performance without using regex.

image

@lawvs lawvs requested a review from WebReflection December 15, 2024 08:52
@WebReflection WebReflection merged commit 5216400 into WebReflection:main Dec 15, 2024
2 checks passed
@WebReflection
Copy link
Owner

It's up and running (or better, published)

@lawvs lawvs deleted the fix/replace branch December 15, 2024 18:27
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.

Unexpected characters $$ were escaped in scripts

2 participants