Function
wrapLines
(value: string, marker: '**' | '_' | '~~')
Source from the content-addressed store, hash-verified
| 217 | |
| 218 | const tagName = node.tagName.toLowerCase(); |
| 219 | const wrapLines = (value: string, marker: '**' | '_' | '~~') => { |
| 220 | if (!value.includes('\n')) { |
| 221 | return `${marker}${value}${marker}`; |
| 222 | } |
| 223 | |
| 224 | return value |
| 225 | .split('\n') |
| 226 | .map((line) => (line ? `${marker}${line}${marker}` : '')) |
| 227 | .join('\n'); |
| 228 | }; |
| 229 | |
| 230 | switch (tagName) { |
| 231 | case 'strong': |
Tested by
no test coverage detected