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

fix: Fix ast-grep runner when there are special characters #1495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohebifar
Copy link
Member

📚 Description

ast-grep offsets are not unicode aware and are just byte offsets. This causes our custom transformer producing broken texts. This PR introduces a fix that utilizes TextEncoder to make the updates unicode-aware.

🔗 Linked Issue

🧪 Test Plan

📄 Documentation to Update

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
codemod ⬜️ Ignored (Inspect) Mar 4, 2025 5:43am

Copy link

pkg-pr-new bot commented Mar 4, 2025

Open in Stackblitz

npm i https://pkg.pr.new/codemod@1495

commit: 7c267a5

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.

2 participants