src/transform/step.js
// the step was entirely deleted by the mapping.
the step was entirely deleted by the mapping.
the step was entirely deleted by the mapping .
map(remapping) {
    let allDeleted = true
    let from = null, to = null, pos = null
    if (this.from) {
      let result = remapping.map(this.from, 1)
      from = result.pos
      if (!result.deleted) allDeleted = false
    }
    if (this.to) {
      if (this.to.cmp(this.from) == 0) {
        to = from
      } else {
        let result = remapping.map(this.to, -1)
        to = result.pos.max(from)
        if (!result.deleted) allDeleted = false
      }
    }
    if (this.pos) {
      if (from && this.pos.cmp(this.from) == 0) {
        pos = from
      } else if (to && this.pos.cmp(this.to) == 0) {
        pos = to
      } else {
        let result = remapping.map(this.pos, 1)
        pos = result.pos
        if (!result.deleted) allDeleted = false
      }
    }
    return allDeleted ? null : new Step(this.type, from, to, pos, this.param)
  }
map ( remapping ) { let allDeleted = true let from = null , to = null , pos = null if ( this . from ) { let result = remapping . map ( this . from , 1 ) from = result . pos if ( ! result . deleted ) allDeleted = false } if ( this . to ) { if ( this . to . cmp ( this . from ) == 0 ) { to = from } else { let result = remapping . map ( this . to , - 1 ) to = result . pos . max ( from ) if ( ! result . deleted ) allDeleted = false } } if ( this . pos ) { if ( from && this . pos . cmp ( this . from ) == 0 ) { pos = from } else if ( to && this . pos . cmp ( this . to ) == 0 ) { pos = to } else { let result = remapping . map ( this . pos , 1 ) pos = result . pos if ( ! result . deleted ) allDeleted = false } } return allDeleted ? null : new Step ( this . type , from , to , pos , this . param ) }
the step was entirely deleted by the mapping.
the step was entirely deleted by the mapping .