simple-writer icon indicating copy to clipboard operation
simple-writer copied to clipboard

Potential typo in comment exporter

Open e-e-e opened this issue 6 years ago • 0 comments

This simple writer does not have an exporter - but I think that this line potentially has a typo with the placement of brackets. https://github.com/substance/simple-writer/blob/master/lib/comment/CommentConverter.js#L28 Exporter is never called by simple-writer so this is not obvious.

Should it read?

  export: function(node, el) {
    el.attr({
      'data-type': 'comment',
      'data-comment': node.content
    }).append(node.content)
  }

Also also - why are you appending node.content to the element as well as adding node.content as an attribute. Is this correct too?

e-e-e avatar Apr 29 '18 13:04 e-e-e