From 771d246a96cd476fa9fddf600c532a28b2efd93a Mon Sep 17 00:00:00 2001 From: to-s Date: Mon, 19 Oct 2020 12:38:51 -0400 Subject: Substitute author and email by git config (#186) * Substitute author and email by git config * Upgraded version of typescript Due to https://github.com/cschlosser/doxdocgen/pull/186#discussion_r505813068 * Moved to CppDocGen.generateAuthorTag() Due to https://github.com/cschlosser/doxdocgen/pull/186#discussion_r505819542 * Update README.md Due to https://github.com/cschlosser/doxdocgen/pull/186#discussion_r505822908 * Update TestSetup.ts * Added tests * Changed return type to string Due to https://ci.appveyor.com/project/cschlosser/doxdocgen/builds/35818180#L566 Co-authored-by: Christoph Schlosser <2466365+cschlosser@users.noreply.github.com> --- src/CodeParserController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/CodeParserController.ts') diff --git a/src/CodeParserController.ts b/src/CodeParserController.ts index 4490f69..f87e221 100644 --- a/src/CodeParserController.ts +++ b/src/CodeParserController.ts @@ -10,6 +10,7 @@ import { } from "vscode"; import CodeParser from "./Common/ICodeParser"; import { Config } from "./Config"; +import GitConfig from "./GitConfig"; import CppParser from "./Lang/Cpp/CppParser"; /** * @@ -21,6 +22,7 @@ import CppParser from "./Lang/Cpp/CppParser"; export default class CodeParserController { private disposable: Disposable; private cfg: Config; + private gitConfig: GitConfig; /** * Creates an instance of CodeParserController @@ -29,6 +31,7 @@ export default class CodeParserController { */ public constructor() { const subscriptions: Disposable[] = []; + this.gitConfig = new GitConfig(); // Hand off the event to the parser if a valid parser is found workspace.onDidChangeTextDocument((event) => { @@ -132,6 +135,6 @@ export default class CodeParserController { const nextLineText: string = window.activeTextEditor.document.lineAt(startReplace.line + 1).text; const endReplace = new Position(currentPos.line + 1, nextLineText.length); - parser.Parse(activeEditor).GenerateDoc(new Range(startReplace, endReplace)); + parser.Parse(activeEditor).GenerateDoc(new Range(startReplace, endReplace), this.gitConfig); } } -- cgit v1.2.3