Skip to content

fix(typed_link): recognize inline Dataview fields inside blockquotes - #745

Merged
michaelpporter merged 1 commit into
mainfrom
fix-blockquote-inline-fields
Jul 25, 2026
Merged

fix(typed_link): recognize inline Dataview fields inside blockquotes#745
michaelpporter merged 1 commit into
mainfrom
fix-blockquote-inline-fields

Conversation

@michaelpporter

Copy link
Copy Markdown
Owner

Phase 2 of the 1.12-compat reconciliation (from today's grill session). Not tied to a filed issue — the gap was found while comparing main against 1.12-compat.

The gap

1.12-compat's 4.14.3 (#724) added blockquote support to the inline-field regex: > up:: [[Note]] — the shape of an Obsidian callout or blockquote line — is recognized as an inline field there. main never got the equivalent change, and tests/graph/builders/typed_link.test.ts had a test pinning > down:: [[X]] as returning null.

Fix

LINE_FIELD_REGEX gains an optional > prefix ahead of the existing list-marker prefix:

/^(?:\s*>+\s*)?(?:\s*[-*+\d.]+\s+)?([\w][\w\s-]*)\s*::\s*/

The #731 span-scoping still applies unchanged — a link trailing a blockquote field on the same line stays ordinary prose rather than becoming part of the field's value (covered by a new test).

Tests

  • Flipped the negative "non-word line start (blockquote)" case in parse_inline_fields to a positive one, plus a blockquote + list-marker combination
  • New builder-level integration test: > (up:: [[Note]]) [[Other]] → one edge, to Note, not Other

bun run build && bun run test pass (382 tests, 0 type errors, svelte-check 0/0).

main's LINE_FIELD_REGEX required a field name at the very start of the
line, so `> up:: [[Note]]` — a callout or blockquote line — was never
recognized as an inline field. The 1.12-compat maintenance line already
supports this (4.14.3, #724); main never got the equivalent fix.

Adds an optional `>` prefix (mirroring the list-marker prefix already
handled) ahead of the field name. The span-scoped parsing from #731
still applies unchanged: a link trailing a blockquote field on the same
line stays ordinary prose rather than becoming part of the field's
value.

Flips the negative "blockquote" test case in parse_inline_fields to
positive, adds a case with a blockquote + list marker together, and a
builder-level integration test.
@michaelpporter
michaelpporter merged commit 6c4afeb into main Jul 25, 2026
1 check passed
@michaelpporter
michaelpporter deleted the fix-blockquote-inline-fields branch July 25, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant