From 2af50bd62c2e26975a46b499c1c687be42be80a1 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser <2466365+cschlosser@users.noreply.github.com> Date: Sat, 3 Oct 2020 16:50:43 +0200 Subject: Fix default value in tparams (#172) --- src/Lang/Cpp/CppParser.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Lang/Cpp') 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, -- cgit v1.2.3