ReviewOS

stacks/stx

vscode: hovering after a document's first class attribute hangs the extension host

#2027
Closed chris opened this 9 days ago ·
9 days ago

extractClassesFromDocument (packages/vscode/src/ts-css/utils/class-matcher.ts), given a position, skipped class attributes the position is not in with continue inside a while loop whose advance (match = classRegex.exec(text)) was the loop's last statement. The skip re-tested the same match forever.

The utility-class hover calls it on every hover, so hovering anywhere after a document's first class="..." attribute hung the extension host in a synchronous loop. Affects Stacks.vscode-stx and Stacks.vscode-stacks (through @stacksjs/stx-vscode).

Sign in to comment on this issue.