@heroiclands/package-build 23.12.8 → 24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +3 -2
  3. package/assets/preview/gitea.ini +12 -7
  4. package/assets/styles/content-base.css +293 -24
  5. package/bin/content-commands.mjs +370 -213
  6. package/bin/package-build-preview.mjs +2 -2
  7. package/bin/package-build.mjs +3 -2
  8. package/ci/check-banners.mjs +7 -7
  9. package/config.mjs +21 -6
  10. package/content-config.mjs +199 -80
  11. package/docs/api.md +110 -89
  12. package/docs/authoring/links-and-markup.md +469 -97
  13. package/docs/commands.md +259 -78
  14. package/docs/configuration.md +211 -103
  15. package/docs/content-format.md +4 -4
  16. package/docs/diagnostics.md +44 -2
  17. package/docs/getting-started.md +1 -1
  18. package/docs/guides/icons.md +1 -1
  19. package/docs/guides/module-project.md +5 -8
  20. package/docs/guides/release-and-deploy.md +2 -2
  21. package/docs/guides/site.md +112 -23
  22. package/docs/guides/system-project.md +1 -1
  23. package/docs/guides/writing-in-invented-scripts.md +1247 -0
  24. package/docs/index.md +1 -0
  25. package/docs/project-setup.md +28 -30
  26. package/docs/reference/format-details.md +677 -319
  27. package/docs/reference/note-types.md +47 -10
  28. package/docs/reference/theme-pages.md +178 -108
  29. package/docs/source-preview.md +16 -2
  30. package/engine/anchors.mjs +2 -2
  31. package/engine/asset-shipping.mjs +22 -10
  32. package/engine/base-compiler.mjs +62 -104
  33. package/engine/changelog-lint.mjs +1 -1
  34. package/engine/code-fences.mjs +3 -3
  35. package/engine/content-address.mjs +1 -1
  36. package/engine/content-alerts.mjs +8 -4
  37. package/engine/content-blocks.mjs +29 -14
  38. package/engine/content-embeds.mjs +1 -1
  39. package/engine/content-expand.mjs +376 -0
  40. package/engine/content-figures.mjs +18 -11
  41. package/engine/content-format.yaml +8 -0
  42. package/engine/content-glyphs.mjs +213 -0
  43. package/engine/content-images.mjs +6 -7
  44. package/engine/content-index.mjs +1 -1
  45. package/engine/content-links.mjs +3 -3
  46. package/engine/content-lint.mjs +1 -1
  47. package/engine/content-render.mjs +453 -0
  48. package/engine/content-scripts.mjs +376 -43
  49. package/engine/content-spans.mjs +6 -3
  50. package/engine/content-styles.mjs +91 -0
  51. package/engine/content-symbols.mjs +186 -0
  52. package/engine/content-verse.mjs +738 -0
  53. package/engine/core-report.mjs +169 -0
  54. package/engine/core-vocabulary.mjs +208 -0
  55. package/engine/dictionary-html.mjs +119 -0
  56. package/engine/dictionary-rows.mjs +15 -4
  57. package/engine/field-reference.mjs +5 -5
  58. package/engine/first-use.mjs +17 -27
  59. package/engine/frontmatter-lint.mjs +1 -1
  60. package/engine/heading-attributes.mjs +89 -0
  61. package/engine/helpers.mjs +61 -101
  62. package/engine/homepage.mjs +17 -29
  63. package/engine/html-minify.mjs +70 -0
  64. package/engine/index.mjs +8 -5
  65. package/engine/key-case-collisions.mjs +136 -0
  66. package/engine/language-data.mjs +203 -6
  67. package/engine/language-rows.mjs +8 -2
  68. package/engine/language-terms.mjs +186 -16
  69. package/engine/language-words.mjs +12 -0
  70. package/engine/logographic.mjs +255 -0
  71. package/engine/map-lexicon.mjs +262 -47
  72. package/engine/map-places.mjs +5 -4
  73. package/engine/markdown-expressions.mjs +0 -2
  74. package/engine/markdownlint-run.mjs +9 -3
  75. package/engine/markup-validation.mjs +21 -0
  76. package/engine/metre-declaration.mjs +134 -0
  77. package/engine/names.mjs +36 -9
  78. package/engine/note-matter.mjs +66 -0
  79. package/engine/note-vocabulary.mjs +187 -3
  80. package/engine/pdf-build.mjs +69 -133
  81. package/engine/pdf-render.mjs +205 -58
  82. package/engine/post-fields.mjs +157 -0
  83. package/engine/preview-index.mjs +130 -0
  84. package/engine/preview-source.mjs +450 -0
  85. package/engine/project-init.mjs +5 -12
  86. package/engine/prose-config.mjs +3 -3
  87. package/engine/read-stdin.mjs +29 -0
  88. package/engine/run-rows.mjs +2 -2
  89. package/engine/run-words.mjs +6 -112
  90. package/engine/script-emphasis-terms.mjs +38 -0
  91. package/engine/script-emphasis.mjs +295 -0
  92. package/engine/script-font-delivery.mjs +4 -4
  93. package/engine/site-build.mjs +260 -315
  94. package/engine/site-config.mjs +26 -238
  95. package/engine/site-files.mjs +175 -0
  96. package/engine/site-index.mjs +9 -4
  97. package/engine/site-preview.mjs +52 -525
  98. package/engine/site-render.mjs +593 -0
  99. package/engine/site-root.mjs +22 -13
  100. package/engine/site-search.mjs +161 -0
  101. package/engine/site-serve.mjs +273 -0
  102. package/engine/site-theme-banner.mjs +154 -0
  103. package/engine/site-theme-urls.mjs +125 -0
  104. package/engine/site-theme.mjs +926 -0
  105. package/engine/sql-tables.mjs +20 -3
  106. package/engine/text-maps.mjs +57 -10
  107. package/engine/typographer.mjs +248 -0
  108. package/engine/verse-metre.mjs +357 -0
  109. package/engine/wikilink-syntax.mjs +29 -47
  110. package/engine/wikilinks.mjs +758 -279
  111. package/engine/word-forms.mjs +364 -0
  112. package/engine/word-rows.mjs +12 -2
  113. package/engine/word-terms.mjs +38 -4
  114. package/manifest.mjs +3 -4
  115. package/package.json +11 -8
  116. package/{hugo-theme → site-theme}/data/banners.yaml +6 -10
  117. package/site-theme/layouts/base.hbs +31 -0
  118. package/site-theme/layouts/blog-list.hbs +30 -0
  119. package/site-theme/layouts/blog-post.hbs +40 -0
  120. package/site-theme/layouts/home.hbs +35 -0
  121. package/site-theme/layouts/list.hbs +20 -0
  122. package/site-theme/layouts/not-found.hbs +31 -0
  123. package/site-theme/layouts/page.hbs +7 -0
  124. package/site-theme/partials/copy-buttons.hbs +37 -0
  125. package/site-theme/partials/draft-notice.hbs +5 -0
  126. package/site-theme/partials/exturl.hbs +2 -0
  127. package/{hugo-theme/layouts/partials/footer.html → site-theme/partials/footer.hbs} +10 -7
  128. package/site-theme/partials/header.hbs +44 -0
  129. package/site-theme/partials/hero-banner.hbs +11 -0
  130. package/site-theme/partials/infobox-entry.hbs +2 -0
  131. package/site-theme/partials/infobox-section.hbs +31 -0
  132. package/site-theme/partials/infobox-value.hbs +2 -0
  133. package/site-theme/partials/infobox.hbs +18 -0
  134. package/site-theme/partials/list-members.hbs +9 -0
  135. package/site-theme/partials/nav-links.hbs +5 -0
  136. package/site-theme/partials/page-body.hbs +48 -0
  137. package/site-theme/partials/page-list.hbs +14 -0
  138. package/site-theme/partials/related.hbs +24 -0
  139. package/site-theme/partials/search-meta.hbs +6 -0
  140. package/site-theme/partials/search-names.hbs +2 -0
  141. package/site-theme/partials/search.hbs +52 -0
  142. package/site-theme/partials/tags.hbs +4 -0
  143. package/site-theme/partials/toc.hbs +7 -0
  144. package/{hugo-theme → site-theme}/static/css/style.css +106 -14
  145. package/stage.mjs +1 -2
  146. package/types/config.d.mts +8 -4
  147. package/types/content-config.d.mts +15 -15
  148. package/types/engine/asset-shipping.d.mts +5 -2
  149. package/types/engine/base-compiler.d.mts +20 -2
  150. package/types/engine/code-fences.d.mts +3 -3
  151. package/types/engine/content-address.d.mts +1 -1
  152. package/types/engine/content-alerts.d.mts +8 -2
  153. package/types/engine/content-blocks.d.mts +11 -4
  154. package/types/engine/content-expand.d.mts +288 -0
  155. package/types/engine/content-figures.d.mts +11 -3
  156. package/types/engine/content-glyphs.d.mts +85 -0
  157. package/types/engine/content-images.d.mts +6 -7
  158. package/types/engine/content-links.d.mts +1 -1
  159. package/types/engine/content-render.d.mts +199 -0
  160. package/types/engine/content-scripts.d.mts +70 -4
  161. package/types/engine/content-spans.d.mts +1 -1
  162. package/types/engine/content-styles.d.mts +33 -0
  163. package/types/engine/content-symbols.d.mts +35 -0
  164. package/types/engine/content-verse.d.mts +240 -0
  165. package/types/engine/core-report.d.mts +45 -0
  166. package/types/engine/core-vocabulary.d.mts +53 -0
  167. package/types/engine/dictionary-html.d.mts +8 -0
  168. package/types/engine/dictionary-rows.d.mts +10 -0
  169. package/types/engine/field-reference.d.mts +2 -2
  170. package/types/engine/heading-attributes.d.mts +20 -0
  171. package/types/engine/helpers.d.mts +3 -10
  172. package/types/engine/homepage.d.mts +11 -24
  173. package/types/engine/html-minify.d.mts +9 -0
  174. package/types/engine/index.d.mts +2 -1
  175. package/types/engine/key-case-collisions.d.mts +28 -0
  176. package/types/engine/language-data.d.mts +0 -2
  177. package/types/engine/language-terms.d.mts +24 -2
  178. package/types/engine/logographic.d.mts +45 -0
  179. package/types/engine/map-lexicon.d.mts +66 -13
  180. package/types/engine/map-places.d.mts +8 -0
  181. package/types/engine/markdown-expressions.d.mts +0 -2
  182. package/types/engine/metre-declaration.d.mts +39 -0
  183. package/types/engine/names.d.mts +34 -3
  184. package/types/engine/note-matter.d.mts +48 -0
  185. package/types/engine/pdf-render.d.mts +6 -2
  186. package/types/engine/post-fields.d.mts +44 -0
  187. package/types/engine/preview-index.d.mts +72 -0
  188. package/types/engine/preview-source.d.mts +51 -0
  189. package/types/engine/read-stdin.d.mts +11 -0
  190. package/types/engine/run-rows.d.mts +2 -2
  191. package/types/engine/run-words.d.mts +0 -15
  192. package/types/engine/script-emphasis-terms.d.mts +21 -0
  193. package/types/engine/script-emphasis.d.mts +84 -0
  194. package/types/engine/script-font-delivery.d.mts +4 -4
  195. package/types/engine/site-build.d.mts +71 -113
  196. package/types/engine/site-config.d.mts +14 -134
  197. package/types/engine/site-files.d.mts +73 -0
  198. package/types/engine/site-index.d.mts +11 -3
  199. package/types/engine/site-preview.d.mts +15 -19
  200. package/types/engine/site-render.d.mts +171 -0
  201. package/types/engine/site-root.d.mts +12 -4
  202. package/types/engine/site-search.d.mts +54 -0
  203. package/types/engine/site-serve.d.mts +44 -0
  204. package/types/engine/site-theme-banner.d.mts +51 -0
  205. package/types/engine/site-theme-urls.d.mts +60 -0
  206. package/types/engine/site-theme.d.mts +127 -0
  207. package/types/engine/sql-tables.d.mts +4 -1
  208. package/types/engine/text-maps.d.mts +17 -3
  209. package/types/engine/typographer.d.mts +11 -0
  210. package/types/engine/verse-metre.d.mts +131 -0
  211. package/types/engine/wikilink-syntax.d.mts +30 -48
  212. package/types/engine/wikilinks.d.mts +330 -14
  213. package/types/engine/word-forms.d.mts +83 -0
  214. package/types/manifest.d.mts +3 -4
  215. package/types/stage.d.mts +1 -2
  216. package/types/vendor/markdownlint.d.mts +8 -0
  217. package/vendor/markdownlint.mjs +20388 -0
  218. package/engine/content-poetry.mjs +0 -240
  219. package/engine/web-wikilinks.mjs +0 -594
  220. package/hugo-theme/layouts/404.html +0 -85
  221. package/hugo-theme/layouts/_default/baseof.html +0 -67
  222. package/hugo-theme/layouts/_default/list.html +0 -139
  223. package/hugo-theme/layouts/_default/single.html +0 -4
  224. package/hugo-theme/layouts/blog/list.html +0 -54
  225. package/hugo-theme/layouts/blog-post/single.html +0 -36
  226. package/hugo-theme/layouts/index.html +0 -75
  227. package/hugo-theme/layouts/partials/banner-url.html +0 -141
  228. package/hugo-theme/layouts/partials/cdn-url.html +0 -36
  229. package/hugo-theme/layouts/partials/dictionary-lists.html +0 -58
  230. package/hugo-theme/layouts/partials/draft-notice.html +0 -41
  231. package/hugo-theme/layouts/partials/draft-state.html +0 -26
  232. package/hugo-theme/layouts/partials/header.html +0 -35
  233. package/hugo-theme/layouts/partials/hero-banner.html +0 -85
  234. package/hugo-theme/layouts/partials/infobox/entry.html +0 -18
  235. package/hugo-theme/layouts/partials/infobox/items.html +0 -26
  236. package/hugo-theme/layouts/partials/infobox/section.html +0 -56
  237. package/hugo-theme/layouts/partials/infobox/value.html +0 -43
  238. package/hugo-theme/layouts/partials/infobox.html +0 -57
  239. package/hugo-theme/layouts/partials/page-body.html +0 -152
  240. package/hugo-theme/layouts/partials/related.html +0 -138
  241. package/hugo-theme/layouts/partials/search.html +0 -84
  242. package/hugo-theme/layouts/partials/site-url.html +0 -32
  243. package/hugo-theme/layouts/partials/tags.html +0 -30
  244. package/hugo-theme/layouts/partials/toc.html +0 -28
  245. package/hugo-theme/layouts/partials/warn-missing-banner.html +0 -3
  246. package/hugo-theme/layouts/shortcodes/cartouche.html +0 -64
  247. package/hugo-theme/layouts/shortcodes/exturl.html +0 -12
  248. package/hugo-theme/layouts/shortcodes/glyph.html +0 -43
  249. package/hugo-theme/layouts/shortcodes/pagelist.html +0 -63
  250. package/hugo-theme/theme.toml +0 -11
  251. package/types/engine/content-poetry.d.mts +0 -58
  252. package/types/engine/web-wikilinks.d.mts +0 -107
  253. /package/{hugo-theme → site-theme}/data/banner-kinds.yaml +0 -0
  254. /package/{hugo-theme → site-theme}/static/css/sohl-icons.css +0 -0
  255. /package/{hugo-theme → site-theme}/static/fonts/game-icons-kb.woff2 +0 -0
  256. /package/{hugo-theme → site-theme}/static/img/banners/takheperu-hieroglyphs.svg +0 -0
  257. /package/{hugo-theme → site-theme}/static/img/cartouches/takheperu.svg +0 -0
  258. /package/{hugo-theme → site-theme}/static/js/inline-spoilers.js +0 -0
@@ -1,240 +0,0 @@
1
- /*
2
- * This file is part of the Song of Heroic Lands (SoHL) system for Foundry VTT.
3
- * Copyright (c) 2024-2026 Tom Rodriguez ("Toasty") — <toasty@heroiclands.org>
4
- *
5
- * This work is licensed under the GNU General Public License v3.0 (GPLv3).
6
- * You may copy, modify, and distribute it under the terms of that license.
7
- *
8
- * For full terms, see the LICENSE.md file in the project root or visit:
9
- * https://www.gnu.org/licenses/gpl-3.0.html
10
- *
11
- * SPDX-License-Identifier: GPL-3.0-or-later
12
- */
13
-
14
- /** The authored verse lines, excluding stanza separators. */
15
- export function verseLines(body) {
16
- return String(body ?? "")
17
- .split("\n")
18
- .filter((line) => line.trim());
19
- }
20
-
21
- /**
22
- * The least-indented verse is level zero. Every two additional leading spaces
23
- * add one level; a leftover space is discarded and the level stops at eight.
24
- * Blank lines divide stanzas rather than contributing to the baseline.
25
- */
26
- export function poetryStanzas(body) {
27
- const lines = String(body ?? "").split("\n");
28
- const verses = verseLines(body);
29
- if (!verses.length) return [];
30
- const baseline = Math.min(...verses.map((line) => /^ */.exec(line)[0].length));
31
- const stanzas = [];
32
- let stanza = [];
33
- for (const line of lines) {
34
- if (!line.trim()) {
35
- if (stanza.length) stanzas.push(stanza);
36
- stanza = [];
37
- continue;
38
- }
39
- const spaces = /^ */.exec(line)[0].length;
40
- stanza.push({
41
- text: line.slice(spaces).trimEnd(),
42
- level: Math.min(8, Math.floor((spaces - baseline) / 2)),
43
- });
44
- }
45
- if (stanza.length) stanzas.push(stanza);
46
- return stanzas;
47
- }
48
-
49
- /** A verse is inline Markdown even when it starts with block syntax. */
50
- export function inlineVerse(text) {
51
- return String(text)
52
- .replace(/^(#{1,6}\s|>\s|[-+*]\s|:{1,2}\s|`{3,}|~{3,}|-{3,}\s*$)/, "\\$1")
53
- .replace(/^(\d+)([.)])\s/, "$1\\$2 ");
54
- }
55
-
56
- /**
57
- * Keep stanzas as Markdown paragraphs and make every verse line a hard break.
58
- * The surrounding renderer still sees the entire note, so links and footnote
59
- * definitions remain in scope. The span carries the indent for each line.
60
- */
61
- export function poetryMarkdown(body) {
62
- return poetryStanzas(body)
63
- .map((stanza) =>
64
- stanza
65
- .map(
66
- ({ text, level }) =>
67
- `<span class="poetry-line${level ? ` i${level}` : ""}">${inlineVerse(text)}</span>`,
68
- )
69
- .join(" \n"),
70
- )
71
- .join("\n\n");
72
- }
73
-
74
- import MarkdownIt from "markdown-it";
75
- import { slugify } from "./content-slug.mjs";
76
- import { parseExtensionAttributes, refusedAttributes } from "./extension-attributes.mjs";
77
-
78
- const structureParser = new MarkdownIt({ html: true });
79
-
80
- /**
81
- * The keys a poetry fence's attribute block takes. `lang`, `font` and `map`
82
- * are read by `scanRuns` in content-scripts.mjs; `dir`, and on the site
83
- * `data-pagefind-ignore`, are written by its rewrite of a fence set in one of
84
- * the faces, and reach the element as they are written.
85
- */
86
- export const POETRY_KEYS = Object.freeze([
87
- "form",
88
- "meter",
89
- "rhyme",
90
- "syllables",
91
- "lang",
92
- "font",
93
- "map",
94
- "dir",
95
- "data-pagefind-ignore",
96
- ]);
97
-
98
- /** Read poetry code fences; start/end are inclusive zero-based source lines.
99
- * @param {string} source - Authored Markdown.
100
- */
101
- export function scanPoetry(source) {
102
- const lines = String(source ?? "").split("\n"),
103
- blocks = [],
104
- errors = [];
105
- const literalLines = new Set();
106
- for (const token of structureParser.parse(String(source ?? ""), {})) {
107
- if (!token.map || !["blockquote_open", "html_block"].includes(token.type)) continue;
108
- for (let line = token.map[0]; line < token.map[1]; line++) literalLines.add(line);
109
- }
110
- let opening = null;
111
- for (let i = 0; i < lines.length; i++) {
112
- if (literalLines.has(i)) continue;
113
- const match = /^ *(`{3,}|~{3,})(.*)$/.exec(lines[i]);
114
- if (opening) {
115
- if (
116
- match &&
117
- match[1][0] === opening.fence[0] &&
118
- match[1].length >= opening.fence.length &&
119
- !match[2].trim()
120
- ) {
121
- if (opening.name === "poetry") {
122
- const body = lines.slice(opening.start + 1, i).join("\n");
123
- if (!body.trim())
124
- errors.push({
125
- line: opening.start + 1,
126
- column: 1,
127
- message: "poetry block is empty",
128
- });
129
- for (let n = opening.start + 1; n < i; n++) {
130
- const col = lines[n].indexOf("\t");
131
- if (col >= 0)
132
- errors.push({
133
- line: n + 1,
134
- column: col + 1,
135
- message: "tabs are not allowed in poetry",
136
- });
137
- }
138
- if (
139
- opening.attributes.syllables &&
140
- opening.attributes.syllables.split(",").length !== verseLines(body).length
141
- )
142
- errors.push({
143
- line: opening.start + 1,
144
- column: 1,
145
- message: `poetry syllables= gives ${opening.attributes.syllables.split(",").length} counts for ${verseLines(body).length} verse lines`,
146
- });
147
- blocks.push({ ...opening, end: i, body });
148
- }
149
- opening = null;
150
- }
151
- continue;
152
- }
153
- if (!match) continue;
154
- const info = match[2].trim();
155
- opening = {
156
- start: i,
157
- fence: match[1],
158
- name: info.split(/\s/)[0],
159
- attributes: {},
160
- id: "",
161
- classes: [],
162
- indent: /^ */.exec(lines[i])[0],
163
- };
164
- if (opening.name !== "poetry") continue;
165
- const raw = info.slice(6).trim();
166
- const at = { line: i + 1, column: 1 };
167
- if (raw && !/^\{[^}\n]*\}$/.test(raw)) {
168
- errors.push({ ...at, message: "poetry attributes need {…} braces" });
169
- continue;
170
- }
171
- const parsed = parseExtensionAttributes(raw ? raw.slice(1, -1) : "");
172
- opening.id = parsed.id;
173
- opening.classes = parsed.classes;
174
- opening.attributes = parsed.values;
175
- for (const message of [...parsed.problems, ...refusedAttributes(parsed.values)])
176
- errors.push({ ...at, message });
177
- for (const [key, value] of Object.entries(parsed.values)) {
178
- if (!POETRY_KEYS.includes(key))
179
- errors.push({ ...at, message: `${key}= is not a poetry attribute` });
180
- else if (key === "syllables" && !/^[1-9]\d*(?:,[1-9]\d*)*$/.test(value))
181
- errors.push({
182
- ...at,
183
- message: "poetry syllables= needs positive comma-separated counts",
184
- });
185
- }
186
- }
187
- if (opening?.name === "poetry")
188
- errors.push({
189
- line: opening.start + 1,
190
- column: 1,
191
- message: "poetry block needs a closing code fence",
192
- });
193
- return { blocks, errors };
194
- }
195
-
196
- /** Replace verse fences with HTML wrappers whose body remains inline Markdown.
197
- * @param {string} source - Authored Markdown.
198
- */
199
- export function renderPoetry(source) {
200
- const { blocks, errors } = scanPoetry(source),
201
- lines = String(source ?? "").split("\n"),
202
- output = [];
203
- let cursor = 0;
204
- const escape = (value) =>
205
- String(value)
206
- .replace(/&/g, "&amp;")
207
- .replace(/"/g, "&quot;")
208
- .replace(/</g, "&lt;")
209
- .replace(/>/g, "&gt;");
210
- for (const block of blocks) {
211
- output.push(...lines.slice(cursor, block.start));
212
- const attrs = [`class="${escape(["poetry", ...block.classes].join(" "))}"`];
213
- if (block.id) attrs.push(`id="${escape(slugify(block.id))}"`);
214
- for (const [key, value] of Object.entries(block.attributes))
215
- if (!refusedAttributes({ [key]: value }).length)
216
- attrs.push(
217
- `${["lang", "dir", "data-pagefind-ignore"].includes(key) ? key : `data-${key}`}="${escape(value)}"`,
218
- );
219
- let indent = block.indent;
220
- if (
221
- indent.length >= 4 &&
222
- !lines.slice(0, block.start).some((line) => /^ *(?:[-+*]|\d+[.)]) +/.test(line))
223
- )
224
- indent = "";
225
- output.push(
226
- "",
227
- `${indent}<div ${attrs.join(" ")}>`,
228
- "",
229
- ...poetryMarkdown(block.body)
230
- .split("\n")
231
- .map((line) => (line ? indent + line : line)),
232
- "",
233
- `${indent}</div>`,
234
- "",
235
- );
236
- cursor = block.end + 1;
237
- }
238
- output.push(...lines.slice(cursor));
239
- return { markdown: output.join("\n"), errors };
240
- }