Skip to content

Commit

Permalink
fix v-on without argument
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Oct 31, 2023
1 parent 25cc0f5 commit fad0e93
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions markup_fmt/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,15 @@ impl<'s> DocGen<'s> for VueDirective<'s> {
}
}
"on" => {
docs.push(if let Some(VOnStyle::Short) = ctx.options.v_on_style {
Doc::text("@")
} else {
Doc::text("v-on:")
});
if let Some(arg_and_modifiers) = self.arg_and_modifiers {
docs.push(if let Some(VOnStyle::Short) = ctx.options.v_on_style {
Doc::text("@")
} else {
Doc::text("v-on:")
});
docs.push(Doc::text(arg_and_modifiers.trim_start_matches(':')));
} else {
docs.push(Doc::text("v-on"));
}
}
"#" => {
Expand Down

0 comments on commit fad0e93

Please sign in to comment.