Browse Source

spec_templates: Allow all requirements* variables

pull/160/head
jld3103 2 years ago
parent
commit
18e4158dd5
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 7
      packages/spec_templates/bin/generate.dart

7
packages/spec_templates/bin/generate.dart

@ -468,12 +468,7 @@ Future<Map<String, List<Map<String, dynamic>>>> _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();

Loading…
Cancel
Save