MCPcopy Create free account
hub / github.com/microsoft/typescript-go / shouldRescanJsxText

Method shouldRescanJsxText

internal/format/scanner.go:144–153  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

142}
143
144func (s *formattingScanner) shouldRescanJsxText(node *ast.Node) bool {
145 if ast.IsJsxText(node) {
146 return true
147 }
148 if !ast.IsJsxElement(node) || s.hasLastTokenInfo == false {
149 return false
150 }
151
152 return s.lastTokenInfo.token.Kind == ast.KindJsxText
153}
154
155func shouldRescanSlashToken(container *ast.Node) bool {
156 return container.Kind == ast.KindRegularExpressionLiteral

Callers 1

readTokenInfoMethod · 0.95

Calls 2

IsJsxTextFunction · 0.92
IsJsxElementFunction · 0.92

Tested by

no test coverage detected