From 18e4158dd5082c66ff0eb0088b2269e1847e674c Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 16 Dec 2022 12:50:02 +0100 Subject: [PATCH] spec_templates: Allow all requirements* variables --- packages/spec_templates/bin/generate.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/spec_templates/bin/generate.dart b/packages/spec_templates/bin/generate.dart index b51f6c05..672db300 100644 --- a/packages/spec_templates/bin/generate.dart +++ b/packages/spec_templates/bin/generate.dart @@ -468,12 +468,7 @@ Future>>> _parseRoutesFile( throw Exception('Unsupported routes format'); } - final allowedVariables = [ - 'requirements', - 'requirementsWithToken', - 'requirementsWithMessageId', - ]; - final variables = RegExp('^(\\\$(${allowedVariables.join('|')}) =[^;]*;)\$', multiLine: true) + final variables = RegExp(r'^(\$(requirements[a-zA-Z]*) =[^;]*;)$', multiLine: true) .allMatches(content) .map((final match) => match.group(1)!) .toList();