From 47df31e7f54812f1cf7a337ec8a9b36773236a64 Mon Sep 17 00:00:00 2001 From: MeShootIn Date: Tue, 3 Jan 2023 15:47:43 +0500 Subject: [PATCH 1/2] feat(ft): add `dosbatch` support Add `dosbatch` commentstring for security and compatibility reasons. --- lua/Comment/ft.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/Comment/ft.lua b/lua/Comment/ft.lua index 3e6cf713..8c7b6723 100644 --- a/lua/Comment/ft.lua +++ b/lua/Comment/ft.lua @@ -19,6 +19,7 @@ local M = { dbl_hash = '##%s', dash = '--%s', dash_bracket = '--[[%s]]', + dosbatch_l = 'REM %s', handlebars = '{{!--%s--}}', hash = '#%s', hash_bracket = '#[[%s]]', @@ -50,6 +51,7 @@ local L = setmetatable({ cuda = { M.cxx_l, M.cxx_b }, dart = { M.cxx_l, M.cxx_b }, dhall = { M.dash, M.haskell_b }, + dosbatch = { M.dosbatch_l }, dot = { M.cxx_l, M.cxx_b }, eelixir = { M.html, M.html }, elixir = { M.hash }, From 53b83d0675ace436fff53fcf3bf5d8250ab39786 Mon Sep 17 00:00:00 2001 From: MeShootIn Date: Thu, 5 Jan 2023 00:18:25 +0500 Subject: [PATCH 2/2] fix(ft): edit `dosbatch` commentstring Remove the explicit space character from the commentstring and inline it. --- lua/Comment/ft.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/Comment/ft.lua b/lua/Comment/ft.lua index 8c7b6723..d5e4dafe 100644 --- a/lua/Comment/ft.lua +++ b/lua/Comment/ft.lua @@ -19,7 +19,6 @@ local M = { dbl_hash = '##%s', dash = '--%s', dash_bracket = '--[[%s]]', - dosbatch_l = 'REM %s', handlebars = '{{!--%s--}}', hash = '#%s', hash_bracket = '#[[%s]]', @@ -51,7 +50,7 @@ local L = setmetatable({ cuda = { M.cxx_l, M.cxx_b }, dart = { M.cxx_l, M.cxx_b }, dhall = { M.dash, M.haskell_b }, - dosbatch = { M.dosbatch_l }, + dosbatch = { 'REM%s' }, dot = { M.cxx_l, M.cxx_b }, eelixir = { M.html, M.html }, elixir = { M.hash },