MCPcopy Create free account
hub / github.com/sql-js/sql.js / fixMarkup

Function fixMarkup

documentation/javascript/application.js:613–623  ·  view source on GitHub ↗
(value, tabReplace, useBR)

Source from the content-addressed store, hash-verified

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

Callers 1

highlightBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…