rename to split-line-attributes
This commit is contained in:
5 files changed
+26
-21
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user