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

Function convertComment

static/word2md/mammoth.browser.js:416–438  ·  view source on GitHub ↗
(referencedComment, messages, options)

Source from the content-addressed store, hash-verified

414 }
415
416 function convertComment(referencedComment, messages, options) {
417 // TODO: remove duplication with note references
418
419 var label = referencedComment.label;
420 var comment = referencedComment.comment;
421 var body = convertElements(comment.body, messages, options).concat([
422 Html.nonFreshElement("p", {}, [
423 Html.text(" "),
424 Html.freshElement("a", {"href": "#" + referenceHtmlId("comment", comment.commentId)}, [
425 Html.text("↑")
426 ])
427 ])
428 ]);
429
430 return [
431 Html.freshElement(
432 "dt",
433 {"id": referentHtmlId("comment", comment.commentId)},
434 [Html.text("Comment " + label)]
435 ),
436 Html.freshElement("dd", {}, body)
437 ];
438 }
439
440 function convertBreak(element, messages, options) {
441 return htmlPathForBreak(element).wrap(function() {

Callers 1

DocumentConversionFunction · 0.70

Calls 4

textMethod · 0.80
convertElementsFunction · 0.70
referenceHtmlIdFunction · 0.70
referentHtmlIdFunction · 0.70

Tested by

no test coverage detected