@dogsbay/format-obsidian 0.2.0-beta.154 → 0.2.0-beta.155
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/serialize.js +6 -2
- package/package.json +5 -5
package/dist/serialize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { walkInline, applyTextFlags, renderLeaf, prefixLines, pickCodeFence, stripHtml, inlineHtmlToMarkdown, escapeMarkdownText, isSafeHref, codeSpan, markdownDestination, markdownTitle, markdownLatex, footnoteLabel, mapOutsideCodeSpans, neutralizeMarkdown, renderAroundGroup, } from "@dogsbay/serialize-core";
|
|
1
|
+
import { walkInline, applyTextFlags, renderLeaf, prefixLines, pickCodeFence, stripHtml, inlineHtmlToMarkdown, escapeMarkdownText, isSafeHref, codeSpan, markdownDestination, markdownTitle, markdownLatex, footnoteLabel, mapOutsideCodeSpans, neutralizeMarkdown, renderAroundGroup, taskMarker, } from "@dogsbay/serialize-core";
|
|
2
2
|
/**
|
|
3
3
|
* Transform an href for Obsidian vault paths.
|
|
4
4
|
*
|
|
@@ -628,8 +628,12 @@ function listItemToObsidian(node) {
|
|
|
628
628
|
// A list item's text is in `inline` (flat parser shape); nested blocks are
|
|
629
629
|
// in `children`. Reading only children returned "" for every plain bullet.
|
|
630
630
|
const parts = [];
|
|
631
|
+
// a task item's `[ ]` / `[x]` leads (Obsidian draws it as a checkbox)
|
|
632
|
+
const box = taskMarker(node);
|
|
631
633
|
if (node.inline && node.inline.length > 0)
|
|
632
|
-
parts.push(inlineToObsidian(node.inline));
|
|
634
|
+
parts.push(box + inlineToObsidian(node.inline));
|
|
635
|
+
else if (box)
|
|
636
|
+
parts.push(box.trimEnd());
|
|
633
637
|
if (node.children)
|
|
634
638
|
parts.push(...node.children.map(nodeToObsidian).filter(Boolean));
|
|
635
639
|
// Blank line between blocks so Obsidian treats consecutive blockquote-style
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/format-obsidian",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.155",
|
|
4
4
|
"description": "Obsidian format plugin for Dogsbay — import/export Obsidian vaults via TreeNode[]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"@types/node": "^25.9.5",
|
|
24
24
|
"typescript": "^5.9.3",
|
|
25
25
|
"vitest": "^4.1.10",
|
|
26
|
-
"@dogsbay/format-
|
|
27
|
-
"@dogsbay/format-
|
|
26
|
+
"@dogsbay/format-openapi": "0.2.0-beta.155",
|
|
27
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.155"
|
|
28
28
|
},
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@dogsbay/serialize-core": "0.2.0-beta.
|
|
32
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
31
|
+
"@dogsbay/serialize-core": "0.2.0-beta.155",
|
|
32
|
+
"@dogsbay/types": "0.2.0-beta.155"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|