summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CodeParserController.ts7
-rw-r--r--src/Config.ts2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/CodeParserController.ts b/src/CodeParserController.ts
index 1dfc5c4..4e38f06 100644
--- a/src/CodeParserController.ts
+++ b/src/CodeParserController.ts
@@ -80,12 +80,15 @@ export default class CodeParserController {
// Do not trigger when there's whitespace after the trigger sequence
// tslint:disable-next-line:max-line-length
- const seq = "[\\s]*(" + this.cfg.C.triggerSequence.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + ")$";
+ const seq = "[\\s]*([" + this.cfg.C.triggerSequence.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + "]|[" + this.cfg.Python.triggerSequence.replace(/\#/g, "\\$&") + "])$";
const match: RegExpMatchArray = activeLine.text.match(seq);
if (match !== null) {
const cont: string = match[1];
- return this.cfg.C.triggerSequence === cont;
+ return (
+ this.cfg.C.triggerSequence === cont ||
+ cont === "#" // probably python
+ );
} else {
return false;
}
diff --git a/src/Config.ts b/src/Config.ts
index 55a22b5..58f3a43 100644
--- a/src/Config.ts
+++ b/src/Config.ts
@@ -31,7 +31,7 @@ class Python {
return workspace.getConfiguration("doxdocgen.python");
}
- public triggerSequence: string = '"""';
+ public triggerSequence: string = "##";
}
class File {