Embedded HTML Formatting (markup_fmt integration) - #797
Open
chandlerc wants to merge 4 commits into
Open
Conversation
chandlerc
force-pushed
the
html-fmt
branch
2 times, most recently
from
August 5, 2026 08:17
0298dfe to
31e8f1c
Compare
Introduce `HtmlConfig` and `ScriptConfig` settings to control embedded HTML block formatting. - Added configuration structures with kebab-case serialization. - Implemented sourced provenance mapping and merge behavior for per-directory configuration inheritance. - Added `html-fmt` feature dependency gates for `markup_fmt` and `dprint-plugin-typescript`. - Updated intelligent configuration merge unit tests. - Regenerated JSON schema. Assisted-by: Antigravity with Gemini
Introduce the embedded HTML block formatting checker and integrate it into the single-file lint loop and the LSP workspace diagnostics. - Added `LineIndex::byte_to_line_col` range utility to map global byte offsets to 1-indexed (line, character-column) document coordinates. - Added `check_embedded_html_blocks` which parses Markdown files for `Tag::HtmlBlock` events and validates them against `markup_fmt`. - Added script formatting callback mapping to `dprint-plugin-typescript` for script tags. - Added JSX component tag skipping in MDX. - Integrated the check under the `html-fmt` feature gate. Assisted-by: Antigravity with Gemini
…matting Create `docs/embedded-html-formatting.md` describing how HTML block formatting and script tag formatting work inside Markdown documents. Update the global settings reference and configuration file indexes to point to it. Assisted-by: Antigravity with Gemini
Assisted-by: Antigravity with Gemini
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.
PR: Embedded HTML Formatting (markup_fmt integration)
Adds HTML formatting to
rumdlviamarkup_fmt. Supports HTML blocks, JS/TS in<script>tags (viadprint), and Markdown inside HTML comments.This is a draft/starting point for discussion.
Changes
1. Engine Integration (
MD089/embedded-html-fmt)MD089.<!-- rumdl-disable MD089 -->).per-file-ignores.Mutex<Option<Vec<Box<dyn Rule>>>>) to avoid recursion when formatting Markdown inside HTML comments.2. Configuration (
.rumdl.toml)New
[html]and[html.script]sections:3. Robustness Fixes (from review)
LineIndex::byte_to_line_colunder multi-byte UTF-8 by clamping offsets to char boundaries.strip_common_indenton mixed indentation (Unicode whitespace).dprinttypescript configuration outside the script formatting loop.4. Commits
feat(config): add [html] and [html.script] configuration sectionsfeat(html-fmt): implement and integrate embedded HTML formatting check(refactored toMD089in working copy)docs(html-fmt): add user guide and configuration details for HTML formattingfeat(html-fmt): add format-comments-as-markdown optionFeedback Requested
MD089/embedded-html-fmtokay? (Updated fromMD088as it was reserved).[html]or move to[MD089]?markup_fmtanddprint-plugin-typescript(gated underhtml-fmtfeature).