fix(typed_link): recognize inline Dataview fields inside blockquotes - #745
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainagainst1.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.mainnever got the equivalent change, andtests/graph/builders/typed_link.test.tshad a test pinning> down:: [[X]]as returningnull.Fix
LINE_FIELD_REGEXgains an optional>prefix ahead of the existing list-marker prefix: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
"non-word line start (blockquote)"case inparse_inline_fieldsto a positive one, plus a blockquote + list-marker combination> (up:: [[Note]]) [[Other]]→ one edge, toNote, notOtherbun run build && bun run testpass (382 tests, 0 type errors, svelte-check 0/0).