chomp before regex manifest

This commit is contained in:
Vinoth Kannan 2016-08-25 17:15:29 +05:30 committed by GitHub
parent 7e80810de1
commit 648c8d27a6
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ module PrettyText
manifest = File.read("#{Rails.root}/app/assets/javascripts/pretty-text-bundle.js")
root_path = "#{Rails.root}/app/assets/javascripts/"
manifest.each_line do |l|
l = l.chomp
if l =~ /\/\/= require (\.\/)?(.*)$/
apply_es6_file(ctx, root_path, Regexp.last_match[2])
elsif l =~ /\/\/= require_tree (\.\/)?(.*)$/