Skip to content

Commit

Permalink
Gemfile: Only load one of RDiscount and BlueCloth
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Jul 22, 2022
1 parent 0814563 commit 8926ff4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,24 @@ group :secondary do

gem 'nokogiri'

# Both rdiscount and bluecloth embeds Discount and loading
# both at the same time causes strange issues.
discount_gem = ENV["DISCOUNT_GEM"] || "rdiscount"
raise "DISCOUNT_GEM must be set to 'rdiscount' or 'bluecloth'" if !%w[rdiscount bluecloth].include?(discount_gem)

platform :ruby do
gem 'wikicloth'
gem 'rinku' # dependency for wikicloth for handling links

gem 'yajl-ruby'
gem 'redcarpet'
gem 'rdiscount', '>= 2.1.6'
gem 'rdiscount', '>= 2.1.6' if discount_gem == "rdiscount"
gem 'RedCloth'
gem 'commonmarker'
end

platform :mri do
gem 'bluecloth'
gem 'bluecloth' if discount_gem == "bluecloth"
end
end

0 comments on commit 8926ff4

Please sign in to comment.