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'); throw Exception('Unsupported routes format');
} }
final allowedVariables = [ final variables = RegExp(r'^(\$(requirements[a-zA-Z]*) =[^;]*;)$', multiLine: true)
'requirements',
'requirementsWithToken',
'requirementsWithMessageId',
];
final variables = RegExp('^(\\\$(${allowedVariables.join('|')}) =[^;]*;)\$', multiLine: true)
.allMatches(content) .allMatches(content)
.map((final match) => match.group(1)!) .map((final match) => match.group(1)!)
.toList(); .toList();

Loading…
Cancel
Save