Skip to content

Commit

Permalink
Fix anchor escaping in call to Regexp.new (#3265)
Browse files Browse the repository at this point in the history
  • Loading branch information
myabc authored Jan 14, 2025
1 parent 7e335a3 commit 3c2454a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nice-suns-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Fix incorrect classname keys when generating `lib/primer/classify/utilities.yml` with `bundle exec rake utilities:build`.
2 changes: 1 addition & 1 deletion lib/tasks/utilities.rake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace :utilities do
next unless classname.start_with?(k)

key = v
classname.sub!(Regexp.new("\A#{k}-"), "")
classname.sub!(Regexp.new("\\A#{k}-"), "")
end

# If we didn't find a replacement, grab the first text before hyphen
Expand Down

0 comments on commit 3c2454a

Please sign in to comment.