From ae039663b950724fb917aa950c694037d33b50d2 Mon Sep 17 00:00:00 2001 From: Alfred Xing Date: Mon, 13 Apr 2015 22:01:36 -0700 Subject: [PATCH 1/3] Remove Maruku and references to it --- Gemfile | 1 - lib/jekyll/converters/markdown.rb | 3 - .../converters/markdown/maruku_parser.rb | 55 ------------------- site/_docs/configuration.md | 8 --- site/_docs/troubleshooting.md | 15 ----- 5 files changed, 82 deletions(-) delete mode 100644 lib/jekyll/converters/markdown/maruku_parser.rb diff --git a/Gemfile b/Gemfile index 99b66e00..3668ba73 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,6 @@ gem 'rdoc', '~> 3.11' gem 'redgreen', '~> 1.2' gem 'shoulda', '~> 3.5' gem 'cucumber', '1.3.18' -gem 'maruku', '~> 0.7.0' gem 'rdiscount', '~> 2.0' gem 'launchy', '~> 2.3' gem 'simplecov', '~> 0.9' diff --git a/lib/jekyll/converters/markdown.rb b/lib/jekyll/converters/markdown.rb index 39389874..30c7ef36 100644 --- a/lib/jekyll/converters/markdown.rb +++ b/lib/jekyll/converters/markdown.rb @@ -13,7 +13,6 @@ module Jekyll when 'redcarpet' then RedcarpetParser.new(@config) when 'kramdown' then KramdownParser.new(@config) when 'rdiscount' then RDiscountParser.new(@config) - when 'maruku' then MarukuParser.new(@config) else # So they can't try some tricky bullshit or go down the ancestor chain, I hope. if allowed_custom_class?(@config['markdown']) @@ -29,7 +28,6 @@ module Jekyll def valid_processors %w[ - maruku rdiscount kramdown redcarpet @@ -39,7 +37,6 @@ module Jekyll def third_party_processors self.class.constants - %w[ KramdownParser - MarukuParser RDiscountParser RedcarpetParser PRIORITIES diff --git a/lib/jekyll/converters/markdown/maruku_parser.rb b/lib/jekyll/converters/markdown/maruku_parser.rb deleted file mode 100644 index 7be577c8..00000000 --- a/lib/jekyll/converters/markdown/maruku_parser.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Jekyll - module Converters - class Markdown - class MarukuParser - def initialize(config) - require 'maruku' - @config = config - @errors = [] - load_divs_library if @config['maruku']['use_divs'] - load_blahtext_library if @config['maruku']['use_tex'] - - # allow fenced code blocks (new in Maruku 0.7.0) - MaRuKu::Globals[:fenced_code_blocks] = !!@config['maruku']['fenced_code_blocks'] - - rescue LoadError - STDERR.puts 'You are missing a library required for Markdown. Please run:' - STDERR.puts ' $ [sudo] gem install maruku' - raise Errors::FatalException.new("Missing dependency: maruku") - end - - def load_divs_library - require 'maruku/ext/div' - STDERR.puts 'Maruku: Using extended syntax for div elements.' - end - - def load_blahtext_library - require 'maruku/ext/math' - STDERR.puts "Maruku: Using LaTeX extension. Images in `#{@config['maruku']['png_dir']}`." - - # Switch off MathML output - MaRuKu::Globals[:html_math_output_mathml] = false - MaRuKu::Globals[:html_math_engine] = 'none' - - # Turn on math to PNG support with blahtex - # Resulting PNGs stored in `images/latex` - MaRuKu::Globals[:html_math_output_png] = true - MaRuKu::Globals[:html_png_engine] = @config['maruku']['png_engine'] - MaRuKu::Globals[:html_png_dir] = @config['maruku']['png_dir'] - MaRuKu::Globals[:html_png_url] = @config['maruku']['png_url'] - end - - def print_errors_and_fail - print @errors.join - raise MaRuKu::Exception, "MaRuKu encountered problem(s) while converting your markup." - end - - def convert(content) - converted = Maruku.new(content, :error_stream => @errors).to_html.strip - print_errors_and_fail unless @errors.empty? - converted - end - end - end - end -end diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md index 836eed37..d24f49a8 100644 --- a/site/_docs/configuration.md +++ b/site/_docs/configuration.md @@ -514,14 +514,6 @@ quiet: false defaults: [] # Markdown Processors -maruku: - use_tex: false - use_divs: false - png_engine: blahtex - png_dir: images/latex - png_url: /images/latex - fenced_code_blocks: true - rdiscount: extensions: [] diff --git a/site/_docs/troubleshooting.md b/site/_docs/troubleshooting.md index eb65fd40..e9a03b79 100644 --- a/site/_docs/troubleshooting.md +++ b/site/_docs/troubleshooting.md @@ -114,21 +114,6 @@ The various markup engines that Jekyll uses may have some issues. This page will document them to help others who may run into the same problems. -### Maruku - -If your link has characters that need to be escaped, you need to use -this syntax: - -{% highlight text %} -![Alt text](http://yuml.me/diagram/class/[Project]->[Task]) -{% endhighlight %} - -If you have an empty tag, i.e. ``, Maruku -transforms this into `