Add Playwright e2e coverage and Node 20 pin
This commit is contained in:
@@ -68,11 +68,11 @@ interface Props {
|
||||
export function PowerShellHighlighter({ script, className }: Props) {
|
||||
const parts: React.ReactNode[] = []
|
||||
let lastIndex = 0
|
||||
const tokenRegex = new RegExp(TOKEN_REGEX.source, TOKEN_REGEX.flags)
|
||||
|
||||
TOKEN_REGEX.lastIndex = 0
|
||||
let match: RegExpExecArray | null
|
||||
|
||||
while ((match = TOKEN_REGEX.exec(script)) !== null) {
|
||||
while ((match = tokenRegex.exec(script)) !== null) {
|
||||
if (match.index > lastIndex) {
|
||||
parts.push(script.slice(lastIndex, match.index))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user