From 70fafea732dc37f76fe29137459dfd48806670b6 Mon Sep 17 00:00:00 2001 From: monosans Date: Thu, 13 Apr 2023 22:24:35 +0300 Subject: [PATCH] Add support for `--ignore-case` option --- package.json | 5 +++++ src/errorHandler.ts | 1 + src/formatter.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/package.json b/package.json index 6301afa..03e4b64 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,11 @@ }, "description": "Codes to ignore. Leave blank to get them from the djLint config file." }, + "djlint.ignoreCase": { + "type": "boolean", + "default": false, + "description": "Do not fix case on known html tags. Requires djLint>=1.23.0." + }, "djlint.include": { "type": "array", "items": { diff --git a/src/errorHandler.ts b/src/errorHandler.ts index a2582a8..c784719 100644 --- a/src/errorHandler.ts +++ b/src/errorHandler.ts @@ -1,4 +1,5 @@ const versionedOptions = [ + ["ignore-case", "ignoreCase", "1.23.0"], ["include", "include", "1.20.0"], ["configuration", "configuration", "1.13.0"], ["format-css", "formatCss", "1.9.0"], diff --git a/src/formatter.ts b/src/formatter.ts index 90ea61b..ca5040a 100644 --- a/src/formatter.ts +++ b/src/formatter.ts @@ -9,6 +9,7 @@ const formatBoolOptions = [ ["preserveBlankLines", "--preserve-blank-lines"], ["formatCss", "--format-css"], ["formatJs", "--format-js"], + ["ignoreCase", "--ignore-case"] ]; function getFormatArgs(