src/turndown.js
function replacementForNode (node) {
  var rule = this.rules.forNode(node)
  var content = process.call(this, node)
  var whitespace = node.flankingWhitespace
  if (whitespace.leading || whitespace.trailing) content = content.trim()
  return (
    whitespace.leading +
    rule.replacement(content, node, this.options) +
    whitespace.trailing
  )
}
function replacementForNode (node) {
  var rule = this.rules.forNode(node)
  var content = process.call(this, node)
  var whitespace = node.flankingWhitespace
  if (whitespace.leading || whitespace.trailing) content = content.trim()
  return (
    whitespace.leading +
    rule.replacement(content, node, this.options) +
    whitespace.trailing
  )
}
function replacementForNode ( node ) { var rule = this . rules . forNode ( node ) var content = process . call ( this , node ) var whitespace = node . flankingWhitespace if ( whitespace . leading || whitespace . trailing ) content = content . trim ( ) return ( whitespace . leading + rule . replacement ( content , node , this . options ) + whitespace . trailing ) }
Converts an element node to its Markdown equivalent
@private
@param {HTMLElement} node The node to convert
@returns A Markdown representation of the node
@type String
Converts an element node to its Markdown equivalent