var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
var wrap = new RegExp('('+dots+'[.:!?]) (?=[A-Z(<])', 'g'); // separate lines
return line.replace(wrap, '$1\n'+indent+'\t');
});
// treat standalone placeholders as block elements
body = body.replace(/<p>(\[\[.*\]\])<\/p>/g, '$1');
var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation
var wrap = new RegExp('('+dots+'[.:!?]) (?=[A-Z(<])', 'g'); // separate lines
return line.replace(wrap, '$1\n'+indent+'\t');
});
// treat standalone placeholders as block elements
body = body.replace(/<p>(\[\[.*\]\])<\/p>/g, '$1');