refactor(markdown-parser): replace remaining magic numbers with named constants#9264
Conversation
… constants Replace three missed hardcoded literals with their corresponding named constants for consistency with the rest of the codebase: - count_leading_indent: 4 → TAB_STOP_SPACES - consume_indent_prefix: 4 → TAB_STOP_SPACES - render_fenced_code_block: .min(3) → .min(MAX_BLOCK_PREFIX_INDENT)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
WalkthroughThis pull request replaces hard-coded magic numbers with named constants across the markdown parser. Specifically, the value 4 is replaced with Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ematipico missed a few |
Note
AI Assistance Disclosure: This PR was developed with assistance from Claude Code.
Summary
Follow-up to #9228 — three hardcoded literals were missed before that PR merged.
count_leading_indentinparser.rs:4→TAB_STOP_SPACESconsume_indent_prefixinsyntax/mod.rs:4→TAB_STOP_SPACESrender_fenced_code_blockinto_html.rs:.min(3)→.min(MAX_BLOCK_PREFIX_INDENT)No user-facing behavior change. All 652 CommonMark conformance tests pass.
Test Plan
just test-markdown-conformance— 652/652 pass, 100% coveragecargo check -p biome_markdown_parser— compiles cleanlyDocs
N/A — internal refactor only.