cite-wide 0.2.0 Published

v0.2.0 — Assure Inline Citation Spacing for Obsidian Anchor-Link Behavior

Small but load-bearing cleanup to the standalone citation-formatting command: the old punctuation-only pass is now an anchor-link spacing pass. It still moves inline citations behind punctuation and preserves single-space separation across citation chains, but now also catches the more common real-world failure case where an already-Lossless `[^hex]` marker is attached directly to a word or bullet item with no intervening space. The command label was renamed from `Move Citations after Punctuation` to `Assure Spacing for Anchor Link behavior` to match what the transform actually guarantees: rendered citations remain clickable Obsidian footnote anchors with preview-on-hover and jump-on-click behavior.

Why Care?

The Lossless citation syntax is intentionally strict: inline citations render as footnote-style anchors only when the markdown parser sees the right boundary between prose and marker. The spec says a single space must stand between content and citation:

MARKDOWN
content [^hex]
content. [^hex]
content [^hex1] [^hex2]

That spacing is not cosmetic. In Obsidian, it is the difference between an inline citation behaving as a real anchor link — hover for preview, click to jump to the reference definition — and the citation rendering as inert text attached to the preceding token. The same constraint matters for downstream website renderers that consume the same markdown.

The earlier command name, Move Citations after Punctuation, described only one part of the job. It handled punctuation boundaries like sentence.[^abc123]sentence. [^abc123], but missed a common content-authoring pattern: citations attached directly to a word or bullet phrase with no punctuation, e.g. standard[^abc123]. Those are valid claims in the prose but invalid anchor boundaries for rendering.

This matters in the broader Lossless system because citations are the interop anchor between human-authored markdown, canonical citation records, and downstream knowledge layers. The schema blueprint frames citations as portability infrastructure: the same source needs to move from a personal working file into an organizational knowledge base and later into RAG/vector/agentic pipelines without identity loss. If the inline marker does not render or resolve reliably at the markdown layer, the stronger YAML schema and canonical citation archive cannot fully do their job.

What Changed

Standalone formatting command renamed

The command registered in main.ts keeps the same command id:

TS
format-citations-punctuation

But the user-facing command name changed from:

MARKDOWN
Move Citations after Punctuation

to:

MARKDOWN
Assure Spacing for Anchor Link behavior

The new name matches the actual user outcome: assure render-safe spacing around inline citation anchors, not merely move citations relative to punctuation.

Punctuation coverage expanded

The punctuation-spacing path in src/services/citationService.ts now normalizes more than periods and commas. It recognizes:

MARKDOWN
. , : ; ! ?

So already-after-punctuation cases normalize consistently:

MARKDOWN
before: sentence:[^abc123]
after:  sentence: [^abc123]

Alphanumeric boundary fixed

The second pass now catches an alphanumeric character immediately followed by an inline footnote marker:

MARKDOWN
before: standard[^abc123]
after:  standard [^abc123]

This closes the edge case observed in real content where a phrase or bullet item ended without punctuation and the citation was placed flush against the final word.

Citation chains preserved

The existing citation-chain behavior remains intact:

MARKDOWN
before: [^abc123][^def456]
after:  [^abc123] [^def456]

That preservation matters because the spec requires multiple citations in sequence to be separated by exactly one space.

README command label updated

The README command list was updated so the documented command name matches the Obsidian command palette label.

What Changed in Approach (the meta-lesson)

Pattern this rejectsPattern this adopts
Treat citation formatting as punctuation cleanupTreat citation formatting as render-behavior assurance
Fix only .[^hex] and ,[^hex] boundariesNormalize both punctuation and word-to-citation boundaries
Assume already-Lossless [^hex] markers are safeVerify the surrounding markdown boundary that makes them clickable
Name commands after implementation detailName commands after the user-visible guarantee

The generalizable point: a citation marker is not complete until it renders as a citation anchor. Hex IDs, reference definitions, and canonical metadata all depend on the inline marker being recognized by the markdown renderer. Spacing is therefore part of the citation data contract, not visual polish.

Verification

pnpm build passed after the implementation change:

TEXT
tsc -noEmit -skipLibCheck && eslint . && node esbuild.config.mjs production

Open Items

  • No version bump for this small fix. The package remains at 0.2.0; this changelog documents an incremental spec-conformance fix on top of the v0.2.0 parser/formatting work.

  • Shared normalizer opportunity. The LLM parser has its own inline citation spacing normalization path, and this standalone command has a separate implementation. A future cleanup could consolidate the two so all transforms use one canonical inline-spacing helper.

  • Reference-section protection remains important. The command still avoids reference definitions; future changes should preserve that guard so [^{hex}]: ... lines are not rewritten as inline citations.

Files Touched

TEXT
cite-wide/
├── main.ts                                      (renamed command label)
├── README.md                                    (updated command documentation)
├── src/
│   └── services/
│       └── citationService.ts                   (expanded inline citation spacing normalization)
└── context-v/
    └── changelogs/
        └── 2026-05-02_02.md                     (created — this file)

Reference

  • Predecessor changelog: context-v/changelogs/2026-05-02_01.md — v0.2.0 LLM response parser ship with paste-time conversion and spec-conformant output.

  • Inline citation format spec: context-v/reminders/Lossless-Citation-Spec.md — defines the single space before inline [^hex] markers, post-punctuation placement, and single-space separation for citation chains.

  • Citation system blueprint: context-v/blueprints/Lossless-Citation-Standards.md — frames citations as portability infrastructure across personal knowledge, organizational knowledge, and downstream RAG/vector/agentic systems.