summaryrefslogtreecommitdiffstats
path: root/src/Lang/Cpp
diff options
context:
space:
mode:
authorRowan Goemans <RB.Goemans@student.han.nl>2018-01-01 21:22:18 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-02-20 22:02:22 +0100
commit8711b0fb2c8f88a6864096de7813e63fd6cf9f7a (patch)
tree212fd2fb67cfd2f778e42ae955f869bc444afdb2 /src/Lang/Cpp
parentd9cef62f8778fcdc39d26802d5d7457c97e9dfc0 (diff)
downloaddoxdocgen-8711b0fb2c8f88a6864096de7813e63fd6cf9f7a.tar.gz
-- Added tests for the configuration options.
-- Expanded the mock classes to allow for more dynamic setting of the contents.
Diffstat (limited to 'src/Lang/Cpp')
-rw-r--r--src/Lang/Cpp/CppDocGen.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Lang/Cpp/CppDocGen.ts b/src/Lang/Cpp/CppDocGen.ts
index e715583..b98abea 100644
--- a/src/Lang/Cpp/CppDocGen.ts
+++ b/src/Lang/Cpp/CppDocGen.ts
@@ -55,8 +55,7 @@ export default class CppDocGen implements IDocGen {
Implementation
***************************************************************************/
protected getIndentation(): string {
- const line: TextLine = this.activeEditor.document.lineAt(this.activeEditor.selection.start.line);
- return line.text.slice(0, line.firstNonWhitespaceCharacterIndex - 1);
+ return this.activeEditor.document.lineAt(this.activeEditor.selection.start.line).text.match("^\\s*")[0];
}
protected getTemplatedString(replace: string, template: string, param: string): string {
@@ -81,6 +80,10 @@ export default class CppDocGen implements IDocGen {
}
protected generateReturnParams(): string[] {
+ if (this.cfg.includeTypeAtReturn === false) {
+ return [""];
+ }
+
const params: string[] = [];
// Check if return type is a pointer