ReactNativeClient/lib/import-enex-md-gen.js
function(lines) {
		let output = [];
		let newlineCount = 0;
		for (let i = 0; i < lines.length; i++) {
			const line = lines[i];
			if (!line.trim()) {
				newlineCount++;
			} else {
				newlineCount = 0;
			}

			if (newlineCount >= 2) continue;

			output.push(line);
		}
		return output;
	}
function(lines) {
		let output = [];
		let newlineCount = 0;
		for (let i = 0; i < lines.length; i++) {
			const line = lines[i];
			if (!line.trim()) {
				newlineCount++;
			} else {
				newlineCount = 0;
			}

			if (newlineCount >= 2) continue;

			output.push(line);
		}
		return output;
	}
function ( lines ) { let output = [ ] ; let newlineCount = 0 ; for ( let i = 0 ; i < lines . length ; i ++ ) { const line = lines [ i ] ; if ( ! line . trim ( ) ) { newlineCount ++ ; } else { newlineCount = 0 ; } if ( newlineCount >= 2 ) continue ; output . push ( line ) ; } return output ; }
To simplify the result, we only allow up to one empty line between blocks of text
To simplify the result we only allow up to one empty line between blocks of text