@dogsbay/format-obsidian 0.2.0-beta.13 → 0.2.0-beta.130
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/capabilities.d.ts +25 -0
- package/dist/capabilities.js +171 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +148 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/project.d.ts +49 -3
- package/dist/project.js +525 -38
- package/dist/serialize.d.ts +19 -1
- package/dist/serialize.js +664 -130
- package/package.json +8 -5
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js.map +0 -1
- package/dist/serialize.d.ts.map +0 -1
- package/dist/serialize.js.map +0 -1
package/dist/serialize.d.ts
CHANGED
|
@@ -6,8 +6,26 @@
|
|
|
6
6
|
* that have no native Obsidian equivalent.
|
|
7
7
|
*/
|
|
8
8
|
import type { TreeNode } from "@dogsbay/types";
|
|
9
|
+
/**
|
|
10
|
+
* Sanitize a slug into a valid Obsidian BLOCK IDENTIFIER.
|
|
11
|
+
*
|
|
12
|
+
* Obsidian block ids accept only letters, numbers and dashes. Anything else
|
|
13
|
+
* means the `^id` is not parsed as a block id at all — it renders as literal
|
|
14
|
+
* text in BOTH edit and reading view, and any `#^id` link pointing at it is
|
|
15
|
+
* dead.
|
|
16
|
+
*
|
|
17
|
+
* This is not a corner case: AsciiDoc ids join a module and its context with
|
|
18
|
+
* an underscore (`additional-resources_welcome-index`), so a real OpenShift
|
|
19
|
+
* vault had 21,509 unusable anchors across 82% of its notes, and 2,333 of its
|
|
20
|
+
* cross-references (21%) resolved to nothing. The visible tell is that a
|
|
21
|
+
* dash-only id like `^welcome-index` superscripts and hides correctly while
|
|
22
|
+
* its underscore sibling does not.
|
|
23
|
+
*
|
|
24
|
+
* MUST be applied to the anchor and to every link that targets it, or the two
|
|
25
|
+
* stop agreeing — which is worse than leaving both broken.
|
|
26
|
+
*/
|
|
27
|
+
export declare function obsidianBlockId(slug: string): string;
|
|
9
28
|
/**
|
|
10
29
|
* Convert TreeNode[] to Obsidian-flavored Markdown.
|
|
11
30
|
*/
|
|
12
31
|
export declare function treeToObsidian(nodes: TreeNode[]): string;
|
|
13
|
-
//# sourceMappingURL=serialize.d.ts.map
|