@nast/nast2typst 0.3.0 → 0.3.2
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/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -258,7 +258,7 @@ function handleToggle(node, context) {
|
|
|
258
258
|
}
|
|
259
259
|
const toggleBody = node.children.slice(bodyStartIndex).map((child) => processNode(child, context)).join("");
|
|
260
260
|
const toggleParams = headingParam ? `${headingParam}` : "";
|
|
261
|
-
return `// Toggle block\n${toggleParams ? `#toggle(${toggleParams})` : "#toggle"}[${toggleTitle}${isHeadingToggle ? "\n" : ""}][${toggleBody}]`;
|
|
261
|
+
return `// Toggle block\n${toggleParams ? `#toggle(${toggleParams})` : "#toggle"}[${toggleTitle}${isHeadingToggle ? "\n" : ""}][${toggleBody}]\n`;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
//#endregion
|
|
@@ -326,7 +326,7 @@ function handleVideo(node, context) {
|
|
|
326
326
|
comment = `// Source URL: ${node.url}\n`;
|
|
327
327
|
}
|
|
328
328
|
let result = comment;
|
|
329
|
-
result += `#link("${videoUrl}")[🎥 Video]\n`;
|
|
329
|
+
result += `#link("${videoUrl}")[🎥 Video]\\ \n`;
|
|
330
330
|
if (node.data.caption && node.data.caption.length > 0) {
|
|
331
331
|
const caption = node.data.caption.map((child) => processNode(child, context)).join("");
|
|
332
332
|
result += `_${caption}_\n`;
|
|
@@ -345,7 +345,7 @@ function handleFile(node, context) {
|
|
|
345
345
|
}
|
|
346
346
|
const fileName = node.name || "File";
|
|
347
347
|
let result = comment;
|
|
348
|
-
result += `#link("${fileUrl}")[📄 ${fileName}]\n`;
|
|
348
|
+
result += `#link("${fileUrl}")[📄 ${fileName}]\\ \n`;
|
|
349
349
|
if (node.data.caption && node.data.caption.length > 0) {
|
|
350
350
|
const caption = node.data.caption.map((child) => processNode(child, context)).join("");
|
|
351
351
|
result += `_${caption}_\n`;
|
|
@@ -363,7 +363,7 @@ function handlePDF(node, context) {
|
|
|
363
363
|
comment = `// Source URL: ${node.url}\n`;
|
|
364
364
|
}
|
|
365
365
|
let result = comment;
|
|
366
|
-
result += `#link("${pdfUrl}")[📕 PDF Document]\n`;
|
|
366
|
+
result += `#link("${pdfUrl}")[📕 PDF Document]\\ \n`;
|
|
367
367
|
if (node.data.caption && node.data.caption.length > 0) {
|
|
368
368
|
const caption = node.data.caption.map((child) => processNode(child, context)).join("");
|
|
369
369
|
result += `_${caption}_\n`;
|
|
@@ -371,7 +371,7 @@ function handlePDF(node, context) {
|
|
|
371
371
|
return result;
|
|
372
372
|
}
|
|
373
373
|
function handleBookmark(node, context) {
|
|
374
|
-
let result = `#link("${node.url}")[${node.url}]\n`;
|
|
374
|
+
let result = `#link("${node.url}")[${node.url}]\\ \n`;
|
|
375
375
|
if (node.data?.caption && node.data.caption.length > 0) {
|
|
376
376
|
const caption = node.data.caption.map((child) => processNode(child, context)).join("");
|
|
377
377
|
result += `_${caption}_\n`;
|
|
@@ -380,7 +380,7 @@ function handleBookmark(node, context) {
|
|
|
380
380
|
}
|
|
381
381
|
function handleEmbed(node, context) {
|
|
382
382
|
let result = `// Embedded content: ${node.url}\n`;
|
|
383
|
-
result += `#link("${node.url}")[🔗 Embedded Content]\n`;
|
|
383
|
+
result += `#link("${node.url}")[🔗 Embedded Content]\\ \n`;
|
|
384
384
|
if (node.data?.caption && node.data.caption.length > 0) {
|
|
385
385
|
const caption = node.data.caption.map((child) => processNode(child, context)).join("");
|
|
386
386
|
result += `_${caption}_\n`;
|