File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ class Doc
1919
2020 def file_content ( filename )
2121 @fc ||= { }
22- return @fc [ filename ] if @fc . key? ( filename )
23-
24- comments = [ ]
25- IO . readlines ( filename ) . each do | line |
26- next if line =~ /^# \s *@/
27- next if line . strip == '# frozen_string_literal: true'
28- if line =~ /^#(.+)/
29- comments << Regexp . last_match ( 1 ) . strip
30- elsif line =~ /^OctocatalogDiff::/
31- break
22+ @fc [ filename ] ||= begin
23+ comments = [ ]
24+ IO . readlines ( filename ) . each do | line |
25+ next if line =~ /^# \s *@/
26+ next if line . strip == '# frozen_string_literal: true'
27+ if line =~ /^#(.+)/
28+ comments << Regexp . last_match ( 1 ) . strip
29+ elsif line =~ /^OctocatalogDiff::/
30+ break
31+ end
3232 end
33+ comments . join ( "\n " )
3334 end
34- @fc [ filename ] = comments . join ( "\n " )
3535 end
3636
3737 def initialize
You can’t perform that action at this time.
0 commit comments