We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9a9644 commit eeac1afCopy full SHA for eeac1af
server/src/formatting/prettier/plugin.ts
@@ -42,9 +42,13 @@ const plugin: prettier.Plugin = {
42
43
document.loadString(text);
44
45
- const result = await (new PrettierDocumentFormatter(formatterOptions as prettier.ParserOptions))
+ let result = await (new PrettierDocumentFormatter(formatterOptions as prettier.ParserOptions))
46
.formatDocumentAsync(document, defaultAntlersSettings);
47
48
+ const adjustHtmlDoctype = /^(\s*)<!doctype html>/im;
49
+
50
+ result = result.replace(adjustHtmlDoctype, '$1<!DOCTYPE html>');
51
52
return {
53
doc: document,
54
result: result
0 commit comments