use gem/rip versions of deps instead of vendoring
This commit is contained in:
parent
0476d8c00e
commit
957f540952
29
lib/middleman/sprockets+ruby19.rb
Normal file
29
lib/middleman/sprockets+ruby19.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
module Sprockets
|
||||
class SourceFile
|
||||
def source_lines
|
||||
@lines ||= begin
|
||||
lines = []
|
||||
|
||||
comments = []
|
||||
File.open(pathname.absolute_location, 'rb') do |file|
|
||||
file.each do |line|
|
||||
lines << line = SourceLine.new(self, line, file.lineno)
|
||||
|
||||
if line.begins_pdoc_comment? || comments.any?
|
||||
comments << line
|
||||
end
|
||||
|
||||
if line.ends_multiline_comment?
|
||||
if line.ends_pdoc_comment?
|
||||
comments.each { |l| l.comment! }
|
||||
end
|
||||
comments.clear
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
lines
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue