Open cobalamin opened 13 years ago
Huh, apparently Github doesn't email me when I get a message.
One of these days I'm going to remove the BBCode stuff into it's own path. The issue is that it uglifies dual parsing that I really need, (ie. "[b]some linky text[/b]":http://google.com)
You could also try fixing your gemspec on the github repo here. Because there's apparently something wrong with it... :/
Hello! I tried to clone this git repo to modify some HTML output a bit, and use the gem from there inside my Rails 3 application. So I did:
gem 'BBRedCloth', :path => 'vendor/redcloth' which won't work:
Guess because there's no .gemspec here. So what I did was, download the 0.8.4 versioned gem from rubygems.org itself, and well, of course there is a BBRedCloth.gemspec inside the data.tar.gz of the .gem archive.
Copied the contents of the data.tar.gz into the vendor/redcloth, and bundler will do its job. But now, the whole stuff is screwing up.
The interesting stacktrace stuff is this:
vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'method_missing' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to_html' app/helpers/application_helper.rb:25:in 'parse_bb' app/views/reports/show.html.erb:17:in '_app_views_reports_show_html_erb__542381288__613620788_0'
My function to parse the stuff is:
def parse_bb(input) require 'rubygems' gem 'BBRedCloth' require 'RedCloth' RedCloth.new( input, [:bbcode_only] ).to_html end
and to get RedCloth working with BBRedCloth at all, I got this in my Gemfile.
gem 'RedCloth', '4.2.4' gem 'BBRedCloth', :path => 'vendor/redcloth'
Hope you can fix this, because I got to modify some parsing behavior in there... ;) Thanks for the nice gem here so far, it seems to be the first good BBCode parser for Ruby/Rails that I have found yet.
Cheers! Simon