Skip to content

Commit

Permalink
Use Global Regex for Stimulus Configuration (#865)
Browse files Browse the repository at this point in the history
* fix(stimulus): use global regex in template

* chore: update changelog

* chore(contributors): update readme

* double-escape so backlash in Ruby caries over to JS

---------

Co-authored-by: Jared White <[email protected]>
  • Loading branch information
MSILycanthropy and jaredcwhite authored Mar 16, 2024
1 parent 2bf2d1e commit a260a4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
- Use global regex for Stimulus Configuration

## [1.3.2] - 2024-01-01

Expand Down Expand Up @@ -705,7 +706,7 @@ Final release of 0.21.0! See below for full changelog.
## 0.11.1 - 2020-04-24

* Add a git init step to `bridgetown new` command [#18](https://github.com/bridgetownrb/bridgetown/pull/18)
* Update sass-loader webpack config to support .sass [#14](https://github.com/bridgetownrb/bridgetown/pull/14) ([jaredmoody](https://github.com/jaredmoody))
* Update sass-loader webpack config to support .sass [#14](https://github.com/bridgetownrb/bridgetown/pull/14) ([jaredmoody](https://github.com/jaredmoody))
* Add customizable permalinks to Prototype Pages (aka `/path/to/:term/and/beyond`). Use hooks and in-memory caching to speed up Pagination. _Inspired by [use cases like this](https://annualbeta.com/blog/dynamic-social-sharing-images-with-eleventy/)_ [#12](https://github.com/bridgetownrb/bridgetown/pull/12)

## 0.11.0 - 2020-04-21
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ Bridgetown is built by:
|<a href="https://github.com/vvveebs">@vvveebs</a>|<a href="https://github.com/rickychilcott">@rickychilcott</a>|<a href="https://github.com/tommasongr">@tommasongr</a>|<a href="https://github.com/tombruijn">@tombruijn</a>|<a href="https://github.com/svoop">@svoop</a>|
|London, UK|Ohio, US|Amsterdam, The Netherlands|Milan, IT|Europe|

|<img src="https://avatars.githubusercontent.com/michaelherold?s=256" alt="michaelherold" width="128" />|<img src="https://avatars.githubusercontent.com/joemasilotti?s=256" alt="joemasilotti" width="128" />|<img src="https://avatars.githubusercontent.com/ikass?s=256" alt="ikass" width="128" />|<img src="https://avatars.githubusercontent.com/jw81?s=256" alt="jw81" width="128" />|
|:---:|:---:|:---:|:---:|
|<a href="https://github.com/michaelherold">@michaelherold</a>|<a href="https://github.com/joemasilotti">@joemasilotti</a>|<a href="https://github.com/Ikass">@ikass</a>|<a href="https://github.com/jw81">@jw81</a>|
|Omaha, NE|Portland, OR|Latvia|Kansas City, MO|
|<img src="https://avatars.githubusercontent.com/michaelherold?s=256" alt="michaelherold" width="128" />|<img src="https://avatars.githubusercontent.com/joemasilotti?s=256" alt="joemasilotti" width="128" />|<img src="https://avatars.githubusercontent.com/ikass?s=256" alt="ikass" width="128" />|<img src="https://avatars.githubusercontent.com/jw81?s=256" alt="jw81" width="128" />|<img src="https://avatars.githubusercontent.com/MSILycanthropy?s=256" alt="jw81" width="128" />
|:---:|:---:|:---:|:---:|:---:|
|<a href="https://github.com/michaelherold">@michaelherold</a>|<a href="https://github.com/joemasilotti">@joemasilotti</a>|<a href="https://github.com/Ikass">@ikass</a>|<a href="https://github.com/jw81">@jw81</a>|<a href="https://github.com/MSILycanthropy">@MSILycanthropy</a>|
|Omaha, NE|Portland, OR|Latvia|Kansas City, MO|Kansas City, MO|

|<img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=identicon&s=128&" alt="" width="128" />|
|:---:|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
if (filename.includes("_controller.") || filename.includes("-controller.")) {
const identifier = filename.replace("./controllers/", "")
.replace(/[_-]controller\\..*$/, "")
.replace("_", "-")
.replace("/", "--")
.replace(/_/g, "-")
.replace(/\\//g, "--")
Stimulus.register(identifier, controller.default)
}
Expand Down

0 comments on commit a260a4b

Please sign in to comment.