Переглянути джерело

Strip heredoc whitespace of attribution text in one place

Thibaut 12 роки тому
батько
коміт
f4f6b67897

+ 1 - 1
lib/docs/filters/core/attribution.rb

@@ -13,7 +13,7 @@ module Docs
       <<-HTML.strip_heredoc
       <div class="_attribution">
         <p class="_attribution-p">
-          #{attribution.delete "\n"}<br>
+          #{attribution.strip_heredoc.delete "\n"}<br>
           #{attribution_link}
         </p>
       </div>

+ 1 - 1
lib/docs/scrapers/backbone.rb

@@ -12,7 +12,7 @@ module Docs
     options[:container] = '.container'
     options[:skip_links] = -> (_) { true }
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2010&ndash;2013 Jeremy Ashkenas, DocumentCloud<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/coffeescript.rb

@@ -11,7 +11,7 @@ module Docs
     options[:container] = '.container'
     options[:skip_links] = -> (_) { true }
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2009&ndash;2013 Jeremy Ashkenas<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/ember.rb

@@ -48,7 +48,7 @@ module Docs
 
     options[:skip_patterns] = [/\._/]
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2013 Yehuda Katz, Tom Dale and Ember.js contributors<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/jquery/jquery.rb

@@ -11,7 +11,7 @@ module Docs
     options[:trailing_slash] = false
     options[:skip_patterns] = [/category/]
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2013 The jQuery Foundation<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/less.rb

@@ -10,7 +10,7 @@ module Docs
     options[:container] = 'section'
     options[:skip_links] = -> (_) { true }
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2009&ndash;2013 Alexis Sellier &amp; The Core Less Team<br>
       Licensed under the Apache License v2.0.
     HTML

+ 1 - 1
lib/docs/scrapers/lodash.rb

@@ -12,7 +12,7 @@ module Docs
     options[:container] = 'h1+div+div'
     options[:skip_links] = -> (_) { true }
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2012&ndash;2013 The Dojo Foundation<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/mdn/mdn.rb

@@ -10,7 +10,7 @@ module Docs
     text_filters.insert_before 'attribution', 'mdn/contribute_link'
 
     options[:trailing_slash] = false
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2013 Mozilla Contributors<br>
       Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
     HTML

+ 1 - 1
lib/docs/scrapers/node.rb

@@ -13,7 +13,7 @@ module Docs
     options[:container] = '#apicontent'
     options[:skip] = %w(index.html all.html documentation.html synopsis.html)
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; Joyent, Inc. and other Node contributors<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/php.rb

@@ -107,7 +107,7 @@ module Docs
       spl.datastructures.html spl.iterators.html spl.interfaces.html
       spl.exceptions.html spl.files.html spl.misc.html)
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 1997&ndash;2013 The PHP Documentation Group<br>
       Licensed under the Creative Commons Attribution License v3.0 or later.
     HTML

+ 1 - 1
lib/docs/scrapers/sass.rb

@@ -17,7 +17,7 @@ module Docs
       'Sass Functions' if filter.slug == 'Sass/Script/Functions'
     end
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2006&ndash;2013 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br>
       Licensed under the MIT License.
     HTML

+ 1 - 1
lib/docs/scrapers/underscore.rb

@@ -12,7 +12,7 @@ module Docs
     options[:container] = '#documentation'
     options[:skip_links] = -> (_) { true }
 
-    options[:attribution] = <<-HTML.strip_heredoc
+    options[:attribution] = <<-HTML
       &copy; 2009&ndash;2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters &amp; Editors<br>
       Licensed under the MIT License.
     HTML