User:Aaron Liu/LineComb.js

// Removes all linebreaks except for double ones and hopefully combines OCR hyphens function autoEdLineComb( str ) { const pars = str.split( '\n\n' ); return pars.map( par => {		par = par.replaceAll( /\n(?!)|/g,  );		par = par.replaceAll( '¬ ',  );		par = par.replaceAll( '¬', '' );		return par;	} ).join( '\n\n' ); } // Fixes common spacing issues function autoEdSpacer( str ) { str = str.replaceAll(/(’|”|\.|!|\?|;|.|:|,) /g, '$1 '); str = str.replaceAll(/(“|‘) /g, '$1'); str = str.replaceAll(/ (’|”|\.|!|\?|,|;|:)/g, '$1'); return str; }