Skip to content

Commit

Permalink
Add more context to the rubular link and remove unneeded slash in the…
Browse files Browse the repository at this point in the history
… regex
  • Loading branch information
caleywoods committed May 15, 2024
1 parent de66f88 commit 3861844
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _plugins/pa11y.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ def parameterless_path(path)
# @todo Is there a way to unnest this code? Jekyll hooks don't allow
# early returns.
Jekyll::Hooks.register :site, :post_render do |site|
# This rubular link shows an example of the generated regular expression
# and how it works against an imagined set of changed files
# https://rubular.com/r/nfFL9P69KHSBoY
global_files = Regexp.new SITEWIDE_FOLDERS.map { |x| "\^#{x}" }.join("|")
global_files = Regexp.new SITEWIDE_FOLDERS.map { |x| "^#{x}" }.join("|")
if DIFFER.changed_files.grep(global_files).any?
File.open(PA11Y_TARGET_FILE, 'a') do |f|
SiteSampler.new(site.config).pages.each do |path|
Expand Down

0 comments on commit 3861844

Please sign in to comment.