MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / renderWikiEntryHtml

Function renderWikiEntryHtml

deployments/desktop/static/desktop.js:3983–3993  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

3981 }
3982
3983 function renderWikiEntryHtml(body) {
3984 const content = String(body || "").trim();
3985 if (!content) return `<p>${escapeHtml(ui().wiki.noSummary)}</p>`;
3986 if (/^#{1,3}\s|\n#{1,3}\s|\n-\s/.test(content)) {
3987 return renderMarkdown(content);
3988 }
3989 return content
3990 .split(/\n{2,}/)
3991 .map((paragraph) => `<p>${escapeHtml(paragraph.trim())}</p>`)
3992 .join("");
3993 }
3994
3995 function setWikiEntry(title, body, nodeId = "", options = {}) {
3996 const editor = $("wikiEntryEditor");

Callers 2

setWikiEntryFunction · 0.85
bindEventsFunction · 0.85

Calls 3

uiFunction · 0.85
escapeHtmlFunction · 0.70
renderMarkdownFunction · 0.70

Tested by

no test coverage detected