diff --git a/app/models/govuk_publishing_components/audit_applications.rb b/app/models/govuk_publishing_components/audit_applications.rb index d7603aeafc..d73b5fb4f9 100644 --- a/app/models/govuk_publishing_components/audit_applications.rb +++ b/app/models/govuk_publishing_components/audit_applications.rb @@ -161,7 +161,7 @@ def find_code_references(file, src, regex) end def clean_file_path(file) - file[/(?<=#{Regexp.escape(@path.to_s)}\/)[\/a-zA-Z_-]+.[a-zA-Z+.]+/] + file[/(?<=#{Regexp.escape(@path.to_s)}\/)[\/0-9a-zA-Z_-]+.[0-9a-zA-Z+.]+/] end def clean_file_name(name) diff --git a/spec/component_guide/audit_applications_spec.rb b/spec/component_guide/audit_applications_spec.rb index d0e40abf38..84cbd66f6f 100644 --- a/spec/component_guide/audit_applications_spec.rb +++ b/spec/component_guide/audit_applications_spec.rb @@ -45,7 +45,7 @@ "error summary": ["app/views/welcome/error_summary.html.erb"], details: ["app/views/welcome/asset_helper.html.erb"], feedback: ["app/views/layouts/application.html.erb"], - govspeak: ["app/views/welcome/contextual_navigation.html.erb", "lib/test_file_1.rb"], + govspeak: ["app/views/welcome/contextual_navigation.html.erb", "lib/1_test_file_1.rb"], input: ["app/views/welcome/error_summary.html.erb", "app/views/welcome/error_summary.html.erb"], "layout footer": ["app/views/layouts/dummy_admin_layout.html.erb"], "layout for admin": ["app/views/layouts/dummy_admin_layout.html.erb"], diff --git a/spec/dummy/lib/test_file_1.rb b/spec/dummy/lib/1_test_file_1.rb similarity index 100% rename from spec/dummy/lib/test_file_1.rb rename to spec/dummy/lib/1_test_file_1.rb