(body)
| 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"); |
no test coverage detected