Page MenuHomePhabricator
Paste P5451

(An Untitled Masterwork)
ActivePublic

Authored by matmarex on May 16 2017, 1:48 PM.
Tags
None
Referenced Files
F8099387:
May 16 2017, 1:48 PM
Subscribers
None
replaceLater.forEach( function ( widget, i ) {
config = config.replace(
// Match any number of spaces (for indentation) followed by our placeholder
new RegExp( '([ ]+)"' + replaceKeyword + i + '"' ),
function ( all, indent ) {
var code = getCode( widget );
// Re-add the indent at the beginning, and after every newline
return indent + code.replace( /\n/g, '\n' + indent );
}
);
} );