Conversation
…gin order The default engine was hand-coded and inconsistent with createProcessor: - Missing remarkGithubBlockquoteAlert plugin - remarkMath placed after remarkRehype (wrong phase) - remarkToc had different heading config Now the constructor always uses createProcessor to build the engine, ensuring consistent markdown rendering including lists inside blockquotes. Also moves remarkMath before remarkRehype where it belongs as a remark plugin (mdast phase), and splits rehypeKatex to remain in the rehype phase. Adds tests for blockquote + list rendering (issue #443). https://claude.ai/code/session_01EtCwTREZoVsyLxnPKp6Fzu
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #444 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 470 472 +2
Branches 105 109 +4
=========================================
+ Hits 470 472 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the Writr class to centralize the initialization of the unified processor and improves the handling of Markdown plugins like remarkToc and remarkMath. Specifically, the engine property is now initialized once in the constructor using a dedicated createProcessor method, and new tests have been added to ensure correct rendering of lists within blockquotes. A review comment suggests improving type safety by replacing the any type on the engine property with a more specific type from the unified package.
Addresses review feedback to improve type safety on the public engine property and createProcessor return type. https://claude.ai/code/session_01EtCwTREZoVsyLxnPKp6Fzu
Summary
createProcessor— the static default engine (line 51) was hand-coded and inconsistent withcreateProcessor, missingremarkGithubBlockquoteAlertand havingremarkMathin the wrong plugin phase (afterremarkRehypeinstead of before). The constructor now always usescreateProcessorto build the engine.remarkMathplugin ordering —remarkMathis a remark plugin (mdast phase) but was placed afterremarkRehype(the bridge to hast). It's now correctly placed beforeremarkRehype, withrehypeKatexremaining in the rehype phase.Closes #443
Test plan
pnpm buildsucceedspnpm testpasses with 100% statement/function/line coveragehttps://claude.ai/code/session_01EtCwTREZoVsyLxnPKp6Fzu