FIX: Restore support for `.js.es6` files in PrettyText (#25588)

Regressed in 1757a688c4

https://meta.discourse.org/t/294155
This commit is contained in:
David Taylor 2024-02-07 09:34:31 +00:00 committed by GitHub
parent 32ee0e3c0a
commit dea753a204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ module PrettyText
Discourse.plugins.each do |plugin|
Dir
.glob("#{plugin.directory}/assets/javascripts/**/discourse-markdown/**/*.js")
.filter { |a| File.file?(a) && a.end_with?(".js", ".js.es6") }
.glob("#{plugin.directory}/assets/javascripts/**/discourse-markdown/**/*.{js,js.es6}")
.filter { |a| File.file?(a) }
.each do |f|
module_name =
f.sub(%r{\A.+assets/javascripts/}, "discourse/plugins/#{plugin.name}/").sub(