mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
chomp before regex manifest
This commit is contained in:
@ -64,6 +64,7 @@ module PrettyText
|
|||||||
manifest = File.read("#{Rails.root}/app/assets/javascripts/pretty-text-bundle.js")
|
manifest = File.read("#{Rails.root}/app/assets/javascripts/pretty-text-bundle.js")
|
||||||
root_path = "#{Rails.root}/app/assets/javascripts/"
|
root_path = "#{Rails.root}/app/assets/javascripts/"
|
||||||
manifest.each_line do |l|
|
manifest.each_line do |l|
|
||||||
|
l = l.chomp
|
||||||
if l =~ /\/\/= require (\.\/)?(.*)$/
|
if l =~ /\/\/= require (\.\/)?(.*)$/
|
||||||
apply_es6_file(ctx, root_path, Regexp.last_match[2])
|
apply_es6_file(ctx, root_path, Regexp.last_match[2])
|
||||||
elsif l =~ /\/\/= require_tree (\.\/)?(.*)$/
|
elsif l =~ /\/\/= require_tree (\.\/)?(.*)$/
|
||||||
|
Reference in New Issue
Block a user