fix(generator): resolve expr-based headings to the target filename - #83
Closed
toiroakr wants to merge 1 commit into
Closed
fix(generator): resolve expr-based headings to the target filename#83toiroakr wants to merge 1 commit into
toiroakr wants to merge 1 commit into
Conversation
generate previously printed a HeadingPattern.Expr's literal text (e.g. "filename == heading") as the scaffolded H1 when it had no way to derive a concrete value, since the generator had no knowledge of the target filename. Generate now takes the filename and tries it as the heading for an expr-based pattern: any expression of the shape "f(filename) == f(heading)" (documented example: slug(filename) == slug(heading)) is trivially satisfied once heading == filename. This is verified against the real expression via the same expr-lang evaluator already used for validation (exported as vast.EvaluateHeadingExpr), so an expression that doesn't hold for heading == filename falls back to the previous behavior.
toiroakr
force-pushed
the
fix/generate-heading-placeholder
branch
from
August 27, 2026 01:58
a59e2ec to
857a2c9
Compare
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.
Summary
generatescaffolds an expr-based heading (e.g.filename == heading) as that literal expression text, since the generator doesn't know the target filename — the file then fails its owncheck.vast.EvaluateHeadingExpr), and only falls back to the old text if that candidate doesn't actually satisfy it.