File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,17 @@ use std::path::{Path, PathBuf};
22use std:: sync:: Arc ;
33
44use anyhow:: Result ;
5- use deno_ast:: MediaType ;
65use dprint_core:: configuration:: * ;
76use dprint_development:: * ;
87use dprint_plugin_typescript:: configuration:: * ;
98use dprint_plugin_typescript:: * ;
109
11- fn external_formatter ( media_type : MediaType , text : String , config : & Configuration ) -> Result < Option < String > > {
12- match media_type {
13- MediaType :: Css => format_embedded_css ( & text, config) ,
14- MediaType :: Html => format_html ( & text, config) ,
15- MediaType :: Sql => format_sql ( & text, config) ,
16- _ => unreachable ! ( ) ,
10+ fn external_formatter ( lang : & str , text : String , config : & Configuration ) -> Result < Option < String > > {
11+ match lang {
12+ "css" => format_embedded_css ( & text, config) ,
13+ "html" => format_html ( & text, config) ,
14+ "sql" => format_sql ( & text, config) ,
15+ _ => Ok ( None ) ,
1716 }
1817}
1918
You can’t perform that action at this time.
0 commit comments