src/turndown.js
function separatingNewlines (output, replacement) {
  var newlines = [
    output.match(trailingNewLinesRegExp)[0],
    replacement.match(leadingNewLinesRegExp)[0]
  ].sort()
  var maxNewlines = newlines[newlines.length - 1]
  return maxNewlines.length < 2 ? maxNewlines : '\n\n'
}
function separatingNewlines (output, replacement) {
  var newlines = [
    output.match(trailingNewLinesRegExp)[0],
    replacement.match(leadingNewLinesRegExp)[0]
  ].sort()
  var maxNewlines = newlines[newlines.length - 1]
  return maxNewlines.length < 2 ? maxNewlines : '\n\n'
}
function separatingNewlines ( output , replacement ) { var newlines = [ output . match ( trailingNewLinesRegExp ) [ 0 ] , replacement . match ( leadingNewLinesRegExp ) [ 0 ] ] . sort ( ) var maxNewlines = newlines [ newlines . length - 1 ] return maxNewlines . length < 2 ? maxNewlines : '\n\n' }
Determines the new lines between the current output and the replacement
@private
@param {String} output The current conversion output
@param {String} replacement The string to append to the output
@returns The whitespace to separate the current output and the replacement
@type String
Determines the new lines between the current output and the replacement