Skip to content

Conversation

@kamaravichow
Copy link

updated regex issue and tested it on https://regex101.com

here is the final regex

/```(tsx|typescript|javascript)/g

@vercel
Copy link
Contributor

vercel bot commented Aug 4, 2024

@kamaravichow is attempting to deploy a commit to the Hassanteam Team on Vercel.

A member of the Team first needs to authorize it.

@kamaravichow
Copy link
Author

If even this doesn't work how about

text = text.replace("```tsx", "");
text = text.replace("```typescript", "");
text = text.replace("```javascript", "");
text = text.replace("```", "");

@yavin5
Copy link

yavin5 commented Aug 4, 2024

The question mark in the below regex has to be present for it to work as intended:

 text = text.replace(/```(tsx|typescript|javascript)?/g, "");

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