lukeed/tidyPublic

feat: format xml

Ports @prettier/plugin-xml 3.4.2's printer, and the lexer and
grammar of @xml-tools/parser, which decide what parses and how
text splits. Matches the plugin on 9,466 files under 11 option
sets, apart from the deviations raised in deviations.md.

The CLI walks the plugin's extensions, except those that other
languages mostly use, such as .rs and .typ.
LELuke Edwards authored
ea39051Patch
Parentb36960f
19 files changed+2233-52
StackedSplit
crates/tidyrs/src/css/mod.rs+3 −2
crates/tidyrs/src/css/sink.rs+22 −9
crates/tidyrs/src/handlebars/printer.rs+1 −1
crates/tidyrs/src/html/embed.rs+1 −1
crates/tidyrs/src/lib.rs+1 −0
crates/tidyrs/src/syntax.rs+10 −0
crates/tidyrs/src/xml/ast.rs+137 −0
crates/tidyrs/src/xml/lexer.rs+271 −0
crates/tidyrs/src/xml/mod.rs+357 −0
crates/tidyrs/src/xml/parser.rs+168 −0
crates/tidyrs/src/xml/print.rs+485 −0
crates/tidyrs/src/xml/sort.rs+60 −0
crates/tidyrs/tests/xml.json+349 −0
crates/tidyrs/tests/xml.rs+64 −0
crates/tidyrs_cli/src/main.rs+42 −15
crates/tidyrs_napi/src/lib.rs+77 −24
notice.md+3 −0
tests/oracle/xml-cases.ts+20 −0
tests/oracle/xml.ts+162 −0