79802520

Date: 2025-10-28 07:39:55
Score: 0.5
Natty:
Report link

Thank you, I ran into the same issue. I did a small change, since as mentioned below, this could cause issues with other backslashes, so I changed the code to:

      stringEscapeBackslashes(s: string): string {
        const escaped = s
          .replace(/\\\[/g, '\\\\[')
          .replace(/\\\]/g, '\\\\]')
          .replace(/\\\(/g, '\\\\(')
          .replace(/\\\)/g, '\\\\)');
        return escaped;
      }

(Wanted to put this in a comment, but I couldn't get the code to format.)

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Freek Giele