From f4ca9415cee4330e0e40ad9301a338cb286ff0c4 Mon Sep 17 00:00:00 2001 From: azerr Date: Sat, 18 Apr 2026 10:58:15 +0200 Subject: [PATCH] XML Minify support Fixes #609 Signed-off-by: azerr --- src/commands/clientCommandConstants.ts | 7 ++++++- src/commands/registerCommands.ts | 1 + src/commands/serverCommandConstants.ts | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/commands/clientCommandConstants.ts b/src/commands/clientCommandConstants.ts index 7b021f85..20c27936 100644 --- a/src/commands/clientCommandConstants.ts +++ b/src/commands/clientCommandConstants.ts @@ -74,4 +74,9 @@ export const EXECUTE_WORKSPACE_COMMAND = 'xml.workspace.executeCommand'; export const REFACTOR_SURROUND_WITH_COMMENTS = 'xml.refactor.surround.with.comments'; - export const REFACTOR_SURROUND_WITH_CDATA = 'xml.refactor.surround.with.cdata'; \ No newline at end of file + export const REFACTOR_SURROUND_WITH_CDATA = 'xml.refactor.surround.with.cdata'; + +/** + * Command to minify XML document. + */ + export const MINIFY_DOCUMENT = 'xml.minify'; \ No newline at end of file diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index 6c7c3e6a..86da16f4 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -32,6 +32,7 @@ export async function registerClientServerCommands(context: ExtensionContext, la registerCodeLensReferencesCommands(context, languageClient); registerValidationCommands(context); registerRefactorCommands(context, languageClient); + registerMinifyCommand(context, languageClient); registerAssociationCommands(context, languageClient); registerRestartLanguageServerCommand(context, languageClient); registerConfigurationUpdateCommand(); diff --git a/src/commands/serverCommandConstants.ts b/src/commands/serverCommandConstants.ts index 68a426ee..bb5352f5 100644 --- a/src/commands/serverCommandConstants.ts +++ b/src/commands/serverCommandConstants.ts @@ -34,4 +34,9 @@ export const CHECK_FILE_PATTERN = "xml.check.file.pattern"; /** * Command to surround with tags, comments, cdata */ - export const REFACTOR_SURROUND_WITH = "xml.refactor.surround.with"; \ No newline at end of file + export const REFACTOR_SURROUND_WITH = "xml.refactor.surround.with"; + +/** + * Command to minify XML document + */ + export const MINIFY_DOCUMENT = "xml.minify.document"; \ No newline at end of file