MCPcopy Create free account
hub / github.com/TruthHun/BookStack / convertCommentReference

Function convertCommentReference

static/word2md/mammoth.browser.js:400–414  ·  view source on GitHub ↗
(reference, messages, options)

Source from the content-addressed store, hash-verified

398 }
399
400 function convertCommentReference(reference, messages, options) {
401 return findHtmlPath(reference, htmlPaths.ignore).wrap(function() {
402 var comment = comments[reference.commentId];
403 var count = referencedComments.length + 1;
404 var label = "[" + commentAuthorLabel(comment) + count + "]";
405 referencedComments.push({label: label, comment: comment});
406 // TODO: remove duplication with note references
407 return [
408 Html.freshElement("a", {
409 href: "#" + referentHtmlId("comment", reference.commentId),
410 id: referenceHtmlId("comment", reference.commentId)
411 }, [Html.text(label)])
412 ];
413 });
414 }
415
416 function convertComment(referencedComment, messages, options) {
417 // TODO: remove duplication with note references

Callers

nothing calls this directly

Calls 4

textMethod · 0.80
findHtmlPathFunction · 0.70
referentHtmlIdFunction · 0.70
referenceHtmlIdFunction · 0.70

Tested by

no test coverage detected