(element, nodes, config, collection)
| 59 | wrapper.collection = collection; |
| 60 | return wrapper; |
| 61 | }, _getLineWrapper = (element, nodes, config, collection) => { |
| 62 | let lineWrapper = _getWrapper("line", config, collection), textAlign = window.getComputedStyle(element).textAlign || "left"; |
| 63 | return (startIndex, endIndex) => { |
| 64 | let newLine = lineWrapper(""); |
| 65 | newLine.style.textAlign = textAlign; |
| 66 | element.insertBefore(newLine, nodes[startIndex]); |
| 67 | for (; startIndex < endIndex; startIndex++) { |
| 68 | newLine.appendChild(nodes[startIndex]); |
| 69 | } |
| 70 | newLine.normalize(); |
| 71 | }; |
| 72 | }, _splitWordsAndCharsRecursively = (element, config, wordWrapper, charWrapper, prepForCharsOnly, deepSlice, ignore, charSplitRegEx, specialCharsRegEx, isNested) => { |
| 73 | var _a; |
| 74 | let nodes = Array.from(element.childNodes), i = 0, { wordDelimiter, reduceWhiteSpace = true, prepareText } = config, elementBounds = element.getBoundingClientRect(), lastBounds = elementBounds, isPreformatted = !reduceWhiteSpace && window.getComputedStyle(element).whiteSpace.substring(0, 3) === "pre", ignoredPreviousSibling = 0, wordsCollection = wordWrapper.collection, wordDelimIsNotSpace, wordDelimString, wordDelimSplitter, curNode, words, curWordEl, startsWithSpace, endsWithSpace, j, bounds, curWordChars, clonedNode, curSubNode, tempSubNode, curTextContent, wordText, lastWordText, k; |
| 75 | if (typeof wordDelimiter === "object") { |
no test coverage detected
searching dependent graphs…