index.js
function patch(node, p5, parentSchema) {
  var schema = parentSchema
  var position = node.position
  var children = node.children
  var childNodes = []
  var length = children ? children.length : 0
  var index = -1
  var child

  if (node.type === 'element') {
    if (schema.space === 'html' && node.tagName === 'svg') {
      schema = svg
    }

    p5.namespaceURI = ns[schema.space]
  }

  while (++index < length) {
    child = one(children[index], schema)
    child.parentNode = p5
    childNodes[index] = child
  }

  if (node.type === 'element' || node.type === 'root') {
    p5.childNodes = childNodes
  }

  if (position && position.start && position.end) {
    p5.sourceCodeLocation = {
      startLine: position.start.line,
      startCol: position.start.column,
      startOffset: position.start.offset,
      endLine: position.end.line,
      endCol: position.end.column,
      endOffset: position.end.offset
    }
  }

  return p5
}
function patch(node, p5, parentSchema) {
  var schema = parentSchema
  var position = node.position
  var children = node.children
  var childNodes = []
  var length = children ? children.length : 0
  var index = -1
  var child

  if (node.type === 'element') {
    if (schema.space === 'html' && node.tagName === 'svg') {
      schema = svg
    }

    p5.namespaceURI = ns[schema.space]
  }

  while (++index < length) {
    child = one(children[index], schema)
    child.parentNode = p5
    childNodes[index] = child
  }

  if (node.type === 'element' || node.type === 'root') {
    p5.childNodes = childNodes
  }

  if (position && position.start && position.end) {
    p5.sourceCodeLocation = {
      startLine: position.start.line,
      startCol: position.start.column,
      startOffset: position.start.offset,
      endLine: position.end.line,
      endCol: position.end.column,
      endOffset: position.end.offset
    }
  }

  return p5
}
function patch ( node , p5 , parentSchema ) { var schema = parentSchema var position = node . position var children = node . children var childNodes = [ ] var length = children ? children . length : 0 var index = - 1 var child if ( node . type === 'element' ) { if ( schema . space === 'html' && node . tagName === 'svg' ) { schema = svg } p5 . namespaceURI = ns [ schema . space ] } while ( ++ index < length ) { child = one ( children [ index ] , schema ) child . parentNode = p5 childNodes [ index ] = child } if ( node . type === 'element' || node . type === 'root' ) { p5 . childNodes = childNodes } if ( position && position . start && position . end ) { p5 . sourceCodeLocation = { startLine : position . start . line , startCol : position . start . column , startOffset : position . start . offset , endLine : position . end . line , endCol : position . end . column , endOffset : position . end . offset } } return p5 }
Patch specific properties.
Patch specific properties .