Skip to content

Commit

Permalink
use regex that is supported by all browsers (apache#18811)
Browse files Browse the repository at this point in the history
  • Loading branch information
ys2843 committed Jul 29, 2020
1 parent 9308aca commit b685fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/static_site/src/assets/js/copycode.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $(document).ready(function () {
const cleanPrompt = function (line, prompts) {
let res = line;
for (let i = 0; i < prompts.length; i++) {
let reg = new RegExp("(?<=^\\s*)" + prompts[i]);
let reg = new RegExp("(?:^\\s*)" + prompts[i]);
if (reg.test(res)) {
res = res.replace(reg, "");
break;
Expand Down

0 comments on commit b685fad

Please sign in to comment.