@orkestrel/markdown 0.0.14 → 0.0.15
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.
package/dist/src/core/index.js
CHANGED
|
@@ -1866,7 +1866,7 @@ function markdownToHTML(node) {
|
|
|
1866
1866
|
const current = frame.node;
|
|
1867
1867
|
if (!frame.expanded) {
|
|
1868
1868
|
if (frame.depth >= 64) {
|
|
1869
|
-
values.push("value" in current &&
|
|
1869
|
+
values.push("value" in current && isString(current.value) ? {
|
|
1870
1870
|
category: "text",
|
|
1871
1871
|
value: current.value
|
|
1872
1872
|
} : void 0);
|
|
@@ -2208,7 +2208,7 @@ function renderMarkdown(node) {
|
|
|
2208
2208
|
const current = frame.node;
|
|
2209
2209
|
if (!frame.expanded) {
|
|
2210
2210
|
let escaped = "";
|
|
2211
|
-
if ((frame.depth >= 64 || current.element === "text") && "value" in current &&
|
|
2211
|
+
if ((frame.depth >= 64 || current.element === "text") && "value" in current && isString(current.value)) for (let index = 0; index < current.value.length; index += 1) {
|
|
2212
2212
|
const character = current.value[index] ?? "";
|
|
2213
2213
|
const atLineStart = index === 0 || current.value[index - 1] === "\n";
|
|
2214
2214
|
if (current.element === "text" && character === "!" && index === current.value.length - 1 && frame.escapeBang) {
|
|
@@ -3912,7 +3912,7 @@ var Markdown = class Markdown {
|
|
|
3912
3912
|
#document;
|
|
3913
3913
|
#spans;
|
|
3914
3914
|
constructor(input) {
|
|
3915
|
-
if (
|
|
3915
|
+
if (isString(input)) {
|
|
3916
3916
|
const [document, spans] = parseProvenance(input);
|
|
3917
3917
|
this.#document = document;
|
|
3918
3918
|
this.#spans = new Map(spans);
|