From cb330256d4c4d53af87aa8314d41b6be0bf8f805 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Sat, 30 Sep 2023 19:04:39 -0600 Subject: [PATCH] Use custom wrapper when it's available --- _reformat-common.bash | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_reformat-common.bash b/_reformat-common.bash index bafb4f1..98ae02a 100644 --- a/_reformat-common.bash +++ b/_reformat-common.bash @@ -103,7 +103,6 @@ function custom_sniff() { fi } - ## WOULD_FORMAT_PROJECT_ROOT=$(project_root $1) # FIXME: This needs to be made customizable @@ -169,6 +168,13 @@ function custom_formatter() { function choose_wrapper() { file_type="$1" + custom=$(custom_formatter $PROJECT_ROOT $file_type) + + if [[ ! -z "${custom}" ]]; then + echo -n "$custom" + return + fi + if [[ $file_type = "javascript" || $file_type = "vue" || $file_type = "typescript" ||