ntNode(props) {
  const { object, mode = MODE.SHORT } = props;

  let { textContent } = object.preview;
  if (mode === MODE.TINY) {
    textContent = cropMultipleLines(textContent, 30);
  } else if (mode === MODE.SHORT) {
    textContent = cropString(textContent, 50);
  }

  return span(
    {
      className: "objectBox theme-comment",
      "data-link-actor-id": object.actor,
    },
    `<!-- ${textContent} -->`
  );
}

// Registration
function supportsObject(object, noGrip = false) {
  if (noGrip === true || !isGrip(object)) {
    return false;
  }
  return (
    object.preview && object.preview.nodeType === nodeConstants.COMMENT_NODE
  );
}

// Exports from this module
module.exports = {
  rep: wrapRender(CommentNode),
  supportsObject,
};
PK