MCPcopy
hub / github.com/basecamp/trix / processTextNode

Method processTextNode

src/trix/models/html_parser.js:184–193  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

182 }
183
184 processTextNode(node) {
185 let string = node.data
186 if (!elementCanDisplayPreformattedText(node.parentNode)) {
187 string = squishBreakableWhitespace(string)
188 if (stringEndsWithWhitespace(node.previousSibling?.textContent)) {
189 string = leftTrimBreakableWhitespace(string)
190 }
191 }
192 return this.appendStringWithAttributes(string, this.getTextAttributes(node.parentNode))
193 }
194
195 processElement(element) {
196 let attributes

Callers 1

processNodeMethod · 0.95

Tested by

no test coverage detected