fix(astro-markflow): fix import scan regressions with block comments and CRLF#175
Open
fix(astro-markflow): fix import scan regressions with block comments and CRLF#175
Conversation
…n vite plugin Cache resolveId's readFile + preprocess results for reuse in load(), cache detectProblematicMdxPatterns results from buildStart, and use processedSourceCache in catch blocks instead of re-reading files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…peline to plugin init Moved normalizeStarlightComponents (3→1 call) and createPipeline (3→1 call) out of per-file transform/load hooks into the configResolved hook, since their results are invariant across files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ng scans in transforms Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tml highlighting, and update bench script - collectImportedNames: add skipCodeFences option and early termination at first non-import line - stripScanNoise: consolidate 3 chained .replace() into single regex pass - rewriteAstroSetHtml: collect all set:html blocks then highlight in parallel via Promise.all - bench-pipeline.mjs: use compileBatch production path instead of parseBlocks+blocksToJsx - orchestrator: add pipeline profiling support (MARKFLOW_PIPELINE_PROFILE=1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…regex The getHeadings branch in RE_SCAN_NOISE expected multi-line format with `\n}` on its own line. For single-line output from blocksToJsx/wrapHtmlInJsxModule, `[\s\S]*?\n}` would scan past the closing `}` and match the next `\n}` in the file, stripping the entire JSX body and silently dropping component imports. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…plugin-reduce-redundant-work # Conflicts: # packages/astro-markflow/src/transforms/inject-components.ts
…and CRLF Remove seenImport early-termination in collectImportedNames that missed imports after interleaved const declarations. Add inBlockComment tracking so multi-line /* ... */ comments don't break the scan. Update RE_SCAN_NOISE regex to handle CRLF line endings so getHeadings stripping works on Windows-style files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
seenImportearly-termination incollectImportedNamesthat missed imports after interleavedconstdeclarations; addinBlockCommenttracking for multi-line/* ... */commentsRE_SCAN_NOISEregex to handle CRLF line endings sogetHeadingsstripping works on Windows-style filesTest plan
pnpm --dir packages/astro-markflow testpasses (297/297)🤖 Generated with Claude Code