replaceRight(aPattern, aReplacement) {
    const lastChild = this.children[this.children.length - 1]
    if (lastChild[isSourceNode]) {
      lastChild.replaceRight(aPattern, aReplacement)
    } else if (typeof lastChild === 'string') {
      this.children[this.children.length - 1] = lastChild.replace(
        aPattern,
        aReplacement
      )
    } else {
      this.children.push(''.replace(aPattern, aReplacement))
    }
    return this
  }
Call String.prototype.replace on the very right-most source snippet. Useful
for trimming whitespace from the end of a source node, etc.

@param aPattern The pattern to replace.
@param aReplacement The thing to replace the pattern with.