Add Playwright e2e coverage and Node 20 pin

This commit is contained in:
chihlasm
2026-03-16 02:28:04 -04:00
parent 357f8e2d08
commit e39819f8d0
27 changed files with 1743 additions and 7 deletions

View File

@@ -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))
}