diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/Cargo.toml | 2 | ||||
-rw-r--r-- | cli/tools/fmt.rs | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b4fd053d7..21affb900 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -124,7 +124,7 @@ libz-sys.workspace = true log = { workspace = true, features = ["serde"] } lsp-types.workspace = true malva = "=0.10.1" -markup_fmt = "=0.13.0" +markup_fmt = "=0.13.1" memmem.workspace = true monch.workspace = true notify.workspace = true diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index a7f4fd554..8a4bc4e6c 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -437,25 +437,15 @@ pub fn format_html( ) .map_err(|error| match error { markup_fmt::FormatError::Syntax(error) => { - // TODO(bartlomieju): rework when better error support in `markup_fmt` lands fn inner( error: &markup_fmt::SyntaxError, file_path: &Path, ) -> Option<String> { - let error_str = format!("{}", error); - let error_str = error_str.strip_prefix("syntax error '")?; - - let reason = error_str - .split("' at") - .collect::<Vec<_>>() - .first() - .map(|s| s.to_string())?; - let url = Url::from_file_path(file_path).ok()?; let error_msg = format!( "Syntax error ({}) at {}:{}:{}\n", - reason, + error.kind, url.as_str(), error.line, error.column |