MCPcopy Create free account
hub / github.com/Samirla/xmlview / stylizeTextNode

Function stylizeTextNode

src/renderer.js:159–162  ·  view source on GitHub ↗

* Stylize element node as tokenized HTML fragment * @param {Element} node * @return {String}

(node)

Source from the content-addressed store, hash-verified

157 * @param {Element} node
158 * @return {String}
159 */
160 function stylizeTextNode(node) {
161 var v = xv_utils.trim(node.nodeValue);
162 return v ? '<span class="xv-text" data-xv-id="' + generateId(node) + '">' + processText(node.nodeValue) + '</span>' : '';
163 }
164
165 /**

Callers 1

stylizeFunction · 0.85

Calls 2

generateIdFunction · 0.85
processTextFunction · 0.70

Tested by

no test coverage detected