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

Function markdownListItem

static/word2md/mammoth.browser.js:3488–3505  ·  view source on GitHub ↗
(attributes, list, listItem)

Source from the content-addressed store, hash-verified

3486}
3487
3488function markdownListItem(attributes, list, listItem) {
3489 list = list || {indent: 0, isOrdered: false, count: 0};
3490 list.count++;
3491 listItem.hasClosed = false;
3492
3493 var bullet = list.isOrdered ? list.count + "." : "-";
3494 var start = repeatString("\t", list.indent) + bullet + " ";
3495
3496 return {
3497 start: start,
3498 end: function() {
3499 if (!listItem.hasClosed) {
3500 listItem.hasClosed = true;
3501 return "\n";
3502 }
3503 }
3504 };
3505}
3506
3507var htmlToMarkdown = {
3508 "p": markdownElement("", "\n\n"),

Callers

nothing calls this directly

Calls 1

repeatStringFunction · 0.70

Tested by

no test coverage detected