@dogsbay/format-obsidian 0.2.0-beta.15 → 0.2.0-beta.150

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.
@@ -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