summaryrefslogtreecommitdiffstats
path: root/src/Lang/Cpp
diff options
context:
space:
mode:
authorChristoph Schlosser <2466365+cschlosser@users.noreply.github.com>2020-10-03 16:50:43 +0200
committerGitHub <noreply@github.com>2020-10-03 16:50:43 +0200
commit2af50bd62c2e26975a46b499c1c687be42be80a1 (patch)
tree184584c3294335e3b1039a76e1b25eaa6b05603b /src/Lang/Cpp
parent7240272e98e615c5424856d00f4ab8a70e4cc821 (diff)
downloaddoxdocgen-2af50bd62c2e26975a46b499c1c687be42be80a1.tar.gz
Fix default value in tparams (#172)
Diffstat (limited to 'src/Lang/Cpp')
-rw-r--r--src/Lang/Cpp/CppParser.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index 0fef5dc..8ed4bc8 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -808,6 +808,9 @@ export default class CppParser implements ICodeParser {
// Remove <> and add a comma to the end to remove edge case.
template = template.slice(template.indexOf("<") + 1, template.lastIndexOf(">")).replace(/^\s+|\s+$/g, "") + ",";
+ // Remove = and everything to the right until a , comes up
+ template = template.replace(/(\W*=\W*\S*\,)/gm, ",");
+
const nestedCounts: { [key: string]: number; } = {
"(": 0,
"<": 0,