@@ -46,7 +46,7 @@ function traverse(node, callbacks, parent) {
4646function getComment ( html ) {
4747 const commentStart = "<!--" ;
4848 const commentEnd = "-->" ;
49- const regex = / ^ ( e s l i n t \b | g l o b a l \s ) / ;
49+ const regex = / ^ ( e s l i n t \b | g l o b a l \s ) / u ;
5050
5151 if (
5252 html . slice ( 0 , commentStart . length ) !== commentStart ||
@@ -66,7 +66,7 @@ function getComment(html) {
6666
6767// Before a code block, blockquote characters (`>`) are also considered
6868// "whitespace".
69- const leadingWhitespaceRegex = / ^ [ > \s ] * / ;
69+ const leadingWhitespaceRegex = / ^ [ > \s ] * / u ;
7070
7171/**
7272 * Gets the offset for the first column of the node's first line in the
@@ -115,7 +115,6 @@ function getIndentText(text, node) {
115115 * suffix of the corresponding line in the Markdown code block. There are no
116116 * differences within the line, so the mapping need only provide the offset
117117 * delta at the beginning of each line.
118- *
119118 * @param {string } text The text of the file.
120119 * @param {ASTNode } node A Markdown code block AST node.
121120 * @param {comments } comments List of configuration comment strings that will be
@@ -308,7 +307,7 @@ function adjustBlock(block) {
308307 // Apply the mapping delta for this range.
309308 return range + block . rangeMap [ i - 1 ] . md ;
310309 } ) ,
311- text : message . fix . text . replace ( / \n / g , `\n${ block . baseIndentText } ` )
310+ text : message . fix . text . replace ( / \n / gu , `\n${ block . baseIndentText } ` )
312311 } ;
313312 }
314313
0 commit comments