| Crates.io | reformahtml |
| lib.rs | reformahtml |
| version | 0.1.9 |
| created_at | 2025-09-30 12:04:36.613988+00 |
| updated_at | 2025-10-14 12:10:00.801626+00 |
| description | Command line tool to format HTML or Bikeshed-flavored markdown to no-line-breaks but keep original indentation. |
| homepage | |
| repository | https://github.com/zcorpan/reformahtml |
| max_upload_size | |
| id | 1861032 |
| size | 87,071 |
Command line tool to format HTML or Bikeshed-flavored markdown to no-line-breaks but keep original indentation.
$ cargo install reformahtml
$ reformahtml [--markdown | --no-markdown] <INPUT> [OUTPUT]
If an element should not be reformatted, add the data-noreformat attribute.
To run the regression tests:
cargo test
Regression tests use fixture files in tests/fixtures/inputs (inputs) and tests/fixtures/expected (expected outputs). Processes .bs (with Markdown enabled) and .html (with Markdown disabled) files.
Add a new test: Place a new input file (e.g., my_test.bs or my_test.html) in tests/fixtures/inputs. Run UPDATE_EXPECTED=1 cargo test to generate the corresponding expected file in tests/fixtures/expected.
Update an existing test: Modify the input file or code, then run UPDATE_EXPECTED=1 cargo test to regenerate the expected file.