From 0df36b374ce4011e88aec841ee8840a308f65403 Mon Sep 17 00:00:00 2001 From: Nathan West Date: Sat, 12 Dec 2020 18:51:12 -0500 Subject: [PATCH] Add //! as a comment prefix --- src/configuration.ts | 3 +++ src/rules.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/configuration.ts b/src/configuration.ts index a66eb68..49b5d06 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -148,6 +148,9 @@ export class Configuration { if (line.text.search(/^\s*\/\/\/\s*/) !== -1) { style = '///'; } + if (line.text.search(/^\s*\/\/!\s*/) !== -1) { + style = '//!'; + } } else if (style === '#' && line.text.search(/^\s*#\s*/) !== -1) { indentRegex = /#/; diff --git a/src/rules.ts b/src/rules.ts index 74473b3..1299d21 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -49,6 +49,10 @@ export class Rules { // e.g. /// ...| beforeText: /^\s*\/\/\//, action: { indentAction: IndentAction.None, appendText: '/// '} + },{ + // e.g. //! ...| + beforeText: /^\s*\/\/!/, + action: { indentAction: IndentAction.None, appendText: '//! '} } ]