Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bump up gem version, use Nesta 0.9.13 and don't copy/paste Nesta code…

… (since body_markup is available to make that no longer necessary)
  • Loading branch information...
commit d6ed0378f9f1912334bc54a75eb35a843b9dadba 1 parent 3b8ad47
Micah Chalmer authored
18 lib/nesta-plugin-foldable/init.rb
View
@@ -16,21 +16,11 @@ class Page
def summary
result = pre_fold_summary
return result if result && !result.empty?
-
- # Sigh...it's a shame I had to copy-paste this
- # from nesta's models.rb just to get rid of the
- # heading.
- body_text = case @format
- when :mdown
- markup.sub(/^#[^#].*$\r?\n(\r?\n)?/, '')
- when :haml
- markup.sub(/^\s*%h1\s+.*$\r?\n(\r?\n)?/, '')
- when :textile
- markup.sub(/^\s*h1\.\s+.*$\r?\n(\r?\n)?/, '')
- end
- if body_text.include? '~~fold~~'
- summary_text = body_text.sub(/^[^\n]*~~fold~~.*\Z/m, '');
+ body_markup_text = body_markup
+
+ if body_markup_text.include? '~~fold~~'
+ summary_text = body_markup_text.sub(/^[^\n]*~~fold~~.*\Z/m, '');
convert_to_html(@format, nil, summary_text)
else
nil
2  lib/nesta-plugin-foldable/version.rb
View
@@ -1,7 +1,7 @@
module Nesta
module Plugin
module Foldable
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
end
end
2  nesta-plugin-foldable.gemspec
View
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec", '1.3.0'
s.add_development_dependency "ruby-debug"
- s.add_dependency("nesta", ">= 0.9.11")
+ s.add_dependency("nesta", ">= 0.9.13")
s.add_development_dependency("rake")
s.add_development_dependency('test-unit', '1.2.3')
end

2 comments on commit d6ed037

Graham Ashton

Wow, that was swift work. I just forked it so I could send you a pull request to do just that!

Micah Chalmer

Heh...I happened to be looking at it at at just the right time...

Please sign in to comment.
Something went wrong with that request. Please try again.