naturalized line endings when beginning formatting

This commit is contained in:
Christopher Pickering 2023-01-19 11:53:56 -06:00
parent 64eb26be3f
commit 70e4220c93
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84

View file

@ -19,7 +19,8 @@ def reformat_file(config: Config, this_file: Path) -> dict:
"""Reformat html file."""
rawcode = this_file.read_bytes().decode("utf8")
compressed = compress_html(rawcode, config)
# naturalize the line breaks
compressed = compress_html(("\n").join(rawcode.splitlines()), config)
expanded = expand_html(compressed, config)