rename to split-line-attributes

This commit is contained in:
marc2332 committed 2023-12-09 16:51:41 +01:00
1 parent c10cefffb6
commit ce5d7bd11b
5 files changed
+26 -21

No files matched your search

+5 -2
View File
@@ -102,7 +102,7 @@ impl Writer<'_> {
}
// multiline handlers bump everything down
if attr_len > 1000 || self.out.indent.inline_attributes() {
if attr_len > 1000 || self.out.indent.split_line_attributes() {
opt_level = ShortOptimization::NoOpt;
}
@@ -254,7 +254,6 @@ impl Writer<'_> {
ElementAttr::EventTokens { name, tokens } => {
let out = self.retrieve_formatted_expr(tokens).to_string();
let mut lines = out.split('\n').peekable();
let first = lines.next().unwrap();
@@ -297,6 +296,10 @@ impl Writer<'_> {
beginning.is_empty()
}
pub fn is_empty_children(&self, children: &[BodyNode]) -> bool {
children.is_empty()
}
// check if the children are short enough to be on the same line
// We don't have the notion of current line depth - each line tries to be < 80 total
// returns the total line length if it's short