llamacoder icon indicating copy to clipboard operation
llamacoder copied to clipboard

fix for syntax errors due to md language tags

Open kamaravichow opened this issue 1 year ago • 3 comments

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

here is the final regex

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

kamaravichow avatar Aug 04 '24 02:08 kamaravichow

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 04 '24 02:08 vercel[bot]

If even this doesn't work how about

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

kamaravichow avatar Aug 04 '24 03:08 kamaravichow

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

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

yavin5 avatar Aug 04 '24 06:08 yavin5