Merge pull request #28245 from overleaf/mj-word-count-client-fix

[web] Fix node skipping while waiting for magic comment

GitOrigin-RevId: 8203e7d0779e660d5f6e568b78b0df6d18bfaf58
This commit is contained in:
Mathias Jakobsen
2025-09-02 12:55:36 +01:00
committed by Copybot
parent b50da23bb1
commit ce93941cf2
@@ -303,7 +303,7 @@ export const countWordsInFile = (
to: preambleExtent.to,
enter(nodeRef: SyntaxNodeRef) {
if (state.skipping && !nodeRef.type.is('Comment')) {
return false
return
}
return headMatcher(nodeRef.type)?.(nodeRef)
},
@@ -313,7 +313,7 @@ export const countWordsInFile = (
from: preambleExtent.to,
enter(nodeRef: SyntaxNodeRef) {
if (state.skipping && !nodeRef.type.is('Comment')) {
return false
return
}
return bodyMatcher(nodeRef.type)?.(nodeRef)
},