diff --git a/docs/yuidoc-p5-theme/assets/js/reference.js b/docs/yuidoc-p5-theme/assets/js/reference.js index bfcfe7c281..1030c19903 100644 --- a/docs/yuidoc-p5-theme/assets/js/reference.js +++ b/docs/yuidoc-p5-theme/assets/js/reference.js @@ -2349,7 +2349,7 @@ define('listView',[ var hash = App.router.getHash(item); // fixes broken links for #/p5/> and #/p5/>= - item.hash = item.hash.replace('>', '>'); + item.hash = item.hash.replace(/>/g, '>'); // Create a group list if (!self.groups[group]) { @@ -3395,7 +3395,7 @@ var prettyPrint; // only when not following [|&;<>]. '^.[^\\s\\w.$@\'"`/\\\\]*'; if (options['regexLiterals']) { - punctuation += '(?!\s*\/)'; + punctuation += '(?!\\s*\/)'; } fallthroughStylePatterns.push( diff --git a/src/typography/p5.Font.js b/src/typography/p5.Font.js index 5a555120a0..b4a7269003 100644 --- a/src/typography/p5.Font.js +++ b/src/typography/p5.Font.js @@ -362,7 +362,7 @@ p5.Font = class { x = xOriginal; let line = lines[i]; - line = line.replace('\t', ' '); + line = line.replace(/\t/g, ' '); const glyphs = this._getGlyphs(line); for (let j = 0; j < glyphs.length; j++) {