(src, match)
| 80 | |
| 81 | // wrapWord maintains spaces on either side of the word. |
| 82 | function wrapWord (src, match) { |
| 83 | return replaceHtmlContent(src, match, function (str) { |
| 84 | let result = '' |
| 85 | if (str[0] === ' ') { |
| 86 | result += ' ' |
| 87 | } |
| 88 | result += wrapLetter(wrapWordString(str.trim()), /[^ ]/) |
| 89 | if (str.substr(-1) === ' ') { |
| 90 | result += ' ' |
| 91 | } |
| 92 | return result |
| 93 | }) |
| 94 | } |
| 95 | |
| 96 | return wrapWord(htmlString, / ?([^ ])+ ?/) |
| 97 | } |
no test coverage detected