(value, tabReplace, useBR)
| 611 | |
| 612 | */ |
| 613 | function fixMarkup(value, tabReplace, useBR) { |
| 614 | if (tabReplace) { |
| 615 | value = value.replace(/^((<[^>]+>|\t)+)/gm, function(match, p1, offset, s) { |
| 616 | return p1.replace(/\t/g, tabReplace); |
| 617 | }); |
| 618 | } |
| 619 | if (useBR) { |
| 620 | value = value.replace(/\n/g, '<br>'); |
| 621 | } |
| 622 | return value; |
| 623 | } |
| 624 | |
| 625 | /* |
| 626 | Applies highlighting to a DOM node containing code. Accepts a DOM node and |
no outgoing calls
no test coverage detected
searching dependent graphs…