[GH-ISSUE #81] Regex expression breaks syntax highlighting #66

Open
opened 2026-05-05 15:00:56 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @skattwood on GitHub (Apr 20, 2016).
Original GitHub issue: https://github.com/awatson1978/meteor-api/issues/81

Here is some example code that breaks the syntax highlighting:

var str = "This is a \"quote\" test";
str.replace(/["]/g, '');
// Example function
function foo() {
  console.log("foo");
}
// Example function 2
function bar(arg) {
  console.log("bar");
}
str2 = "this is a test string";
foo();
bar();

Originally created by @skattwood on GitHub (Apr 20, 2016). Original GitHub issue: https://github.com/awatson1978/meteor-api/issues/81 Here is some example code that breaks the syntax highlighting: ``` javascript var str = "This is a \"quote\" test"; str.replace(/["]/g, ''); // Example function function foo() { console.log("foo"); } // Example function 2 function bar(arg) { console.log("bar"); } str2 = "this is a test string"; foo(); bar(); ```
Author
Owner

@skattwood commented on GitHub (Apr 20, 2016):

syntax

<!-- gh-comment-id:212523247 --> @skattwood commented on GitHub (Apr 20, 2016): ![syntax](https://cloud.githubusercontent.com/assets/937745/14683899/0381231e-06e2-11e6-9892-801a4eb6596c.jpg)
Author
Owner

@santisiri commented on GitHub (May 14, 2016):

Same here with a simple regexp like this:

var regexp = /^[A-Za-z'-\s]+$/
return regexp.test(username);
<!-- gh-comment-id:219197890 --> @santisiri commented on GitHub (May 14, 2016): Same here with a simple regexp like this: ``` javascript var regexp = /^[A-Za-z'-\s]+$/ return regexp.test(username); ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/meteor-api#66
No description provided.