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

Function addLineOfJsxText

internal/transformers/jsxtransforms/jsx.go:785–793  ·  view source on GitHub ↗
(b *strings.Builder, trimmedLine string, isInitial bool)

Source from the content-addressed store, hash-verified

783}
784
785func addLineOfJsxText(b *strings.Builder, trimmedLine string, isInitial bool) {
786 // We do not escape the string here as that is handled by the printer
787 // when it emits the literal. We do, however, need to decode JSX entities.
788 decoded := decodeEntities(trimmedLine)
789 if !isInitial {
790 b.WriteString(" ")
791 }
792 b.WriteString(decoded)
793}
794
795/**
796* JSX trims whitespace at the end and beginning of lines, except that the

Callers 1

Calls 1

decodeEntitiesFunction · 0.85

Tested by

no test coverage detected