summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/fmt.rs')
-rw-r--r--cli/tools/fmt.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs
index 6758d7b8b..5d33240a5 100644
--- a/cli/tools/fmt.rs
+++ b/cli/tools/fmt.rs
@@ -206,7 +206,10 @@ pub fn format_file(
fmt_options: FmtOptionsConfig,
) -> Result<String, String> {
let ext = get_extension(file_path).unwrap_or_else(String::new);
- if ext == "md" {
+ if matches!(
+ ext.as_str(),
+ "md" | "mkd" | "mkdn" | "mdwn" | "mdown" | "markdown"
+ ) {
format_markdown(file_text, &fmt_options)
} else if matches!(ext.as_str(), "json" | "jsonc") {
format_json(file_text, &fmt_options)