diff --git a/Rakefile b/Rakefile
deleted file mode 100644
index 6113bfcf..00000000
--- a/Rakefile
+++ /dev/null
@@ -1,341 +0,0 @@
-# -*- ruby -*-
-
-# load all optional developer libraries
-begin
- require 'rubygems'
- require 'rubygems/package_task'
-rescue LoadError
-end
-
-begin
- require 'webgen/page'
-rescue LoadError
-end
-
-begin
- gem 'rdoc' if RUBY_VERSION >= '1.9'
- require 'rdoc/task'
- require 'rdoc/rdoc'
-
- class RDoc::RDoc
-
- alias :old_parse_files :parse_files
-
- def parse_files(options)
- file_info = old_parse_files(options)
- require 'kramdown/options'
-
- # Add options documentation to Kramdown::Options module
- opt_module = @store.all_classes_and_modules.find {|m| m.full_name == 'Kramdown::Options'}
- opt_defs = Kramdown::Options.definitions.sort.collect do |n, definition|
- desc = definition.desc.split(/\n/).map {|l| " #{l}"}
- desc[-2] = []
- desc = desc.join("\n")
- "[#{n} (type: #{definition.type}, default: #{definition.default.inspect})]\n#{desc}\n\n"
- end
- opt_module.comment.text += "\n== Available Options\n\n" << opt_defs.join("\n\n")
-
- file_info
- end
-
- end
-
-rescue LoadError
-end
-
-begin
- require 'rcov/rcovtask'
-rescue LoadError
-end
-
-require 'fileutils'
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/packagetask'
-require 'erb'
-
-$:.unshift('lib')
-require 'kramdown'
-
-# End user tasks ################################################################
-
-task :default => :test
-
-desc "Install using setup.rb"
-task :install do
- ruby "setup.rb config"
- ruby "setup.rb setup"
- ruby "setup.rb install"
-end
-
-task :clobber do
- ruby "setup.rb clean"
-end
-
-if defined?(Webgen)
- desc "Generate the HTML documentation"
- task :htmldoc do
- ruby "-Ilib -S webgen"
- end
- CLOBBER << "htmldoc/"
- CLOBBER << "webgen-tmp"
-end
-
-if defined? RDoc::Task
- rd = RDoc::Task.new do |rdoc|
- rdoc.rdoc_dir = 'htmldoc/rdoc'
- rdoc.title = 'kramdown'
- rdoc.main = 'lib/kramdown/document.rb'
- rdoc.rdoc_files.include('lib')
- end
-end
-
-if defined?(Webgen) && defined?(RDoc::Task)
- desc "Build the whole user documentation"
- task :doc => [:rdoc, 'htmldoc']
-end
-
-tt = Rake::TestTask.new do |test|
- test.warning = false
- test.libs << 'test'
- test.test_files = FileList['test/test_*.rb']
-end
-
-# Release tasks and development tasks ############################################
-
-namespace :dev do
-
- SUMMARY = 'kramdown is a fast, pure-Ruby Markdown-superset converter.'
- DESCRIPTION = < CONTRIBUTERS`
- `echo "======= ====" >> CONTRIBUTERS`
- `git log | grep ^Author: | sed 's/^Author: //' | sort | uniq -c | sort -nr >> CONTRIBUTERS`
- end
-
- CLOBBER << "man/man1/kramdown.1"
- file 'man/man1/kramdown.1' => ['man/man1/kramdown.1.erb'] do
- puts "Generating kramdown man page"
- File.open('man/man1/kramdown.1', 'w+') do |file|
- data = ERB.new(File.read('man/man1/kramdown.1.erb')).result(binding)
- file.write(Kramdown::Document.new(data).to_man)
- end
- end
-
- Rake::PackageTask.new('kramdown', Kramdown::VERSION) do |pkg|
- pkg.need_tar = true
- pkg.need_zip = true
- pkg.package_files = PKG_FILES
- end
-
- if defined? Gem
- spec = Gem::Specification.new do |s|
-
- #### Basic information
- s.name = 'kramdown'
- s.version = Kramdown::VERSION
- s.summary = SUMMARY
- s.description = DESCRIPTION
- s.license = 'MIT'
-
- #### Dependencies, requirements and files
- s.files = PKG_FILES.to_a
-
- s.require_path = 'lib'
- s.executables = ['kramdown']
- s.default_executable = 'kramdown'
- s.required_ruby_version = '>= 2.0'
- s.add_development_dependency 'minitest', '~> 5.0'
- s.add_development_dependency 'coderay', '~> 1.0.0'
- s.add_development_dependency 'rouge'
- s.add_development_dependency 'stringex', '~> 1.5.1'
- s.add_development_dependency 'prawn', '~> 2.0'
- s.add_development_dependency 'prawn-table', '~> 0.2.2'
- s.add_development_dependency 'ritex', '~> 1.0'
- s.add_development_dependency 'itextomml', '~> 1.5'
- s.add_development_dependency 'execjs', '~> 2.7'
- s.add_development_dependency 'sskatex', '>= 0.9.37'
- s.add_development_dependency 'katex', '~> 0.4.3'
-
- #### Documentation
-
- s.has_rdoc = true
- s.rdoc_options = ['--main', 'lib/kramdown/document.rb']
-
- #### Author and project details
-
- s.author = 'Thomas Leitner'
- s.email = 't_leitner@gmx.at'
- s.homepage = "http://kramdown.gettalong.org"
- end
-
-
- task :gemspec => [ 'CONTRIBUTERS', 'VERSION', 'man/man1/kramdown.1'] do
- print "Generating Gemspec\n"
- contents = spec.to_ruby
- File.open("kramdown.gemspec", 'w+') {|f| f.puts(contents)}
- end
-
- Gem::PackageTask.new(spec) do |pkg|
- pkg.need_zip = true
- pkg.need_tar = true
- end
-
- end
-
- if defined?(Webgen) && defined?(Gem) && defined?(Rake::RDocTask)
- desc 'Release Kramdown version ' + Kramdown::VERSION
- task :release => [:clobber, :package, :publish_files, :publish_website]
- end
-
- if defined?(Gem)
- desc "Upload the release to Rubygems"
- task :publish_files => [:package] do
- sh "gem push pkg/kramdown-#{Kramdown::VERSION}.gem"
- puts 'done'
- end
- end
-
- desc "Upload the website"
- task :publish_website => ['doc'] do
- puts "Transfer manually!!!"
- # sh "rsync -avc --delete --exclude 'MathJax' --exclude 'robots.txt' htmldoc/ gettalong@rubyforge.org:/var/www/gforge-projects/kramdown/"
- end
-
-
- if defined? Rcov
- Rcov::RcovTask.new do |rcov|
- rcov.libs << 'test'
- end
- end
-
- CODING_LINE = "# -*- coding: utf-8 -*-\n"
- COPYRIGHT=<
-#
-# This file is part of kramdown which is licensed under the MIT.
-#++
-#
-EOF
-
- desc "Insert/Update copyright notice"
- task :update_copyright do
- inserted = false
- Dir["lib/**/*.rb", "test/**/*.rb"].each do |file|
- if !File.read(file).start_with?(CODING_LINE + COPYRIGHT)
- inserted = true
- puts "Updating file #{file}"
- old = File.read(file)
- if !old.gsub!(/\A#{Regexp.escape(CODING_LINE)}#\n#--.*?\n#\+\+\n#\n/m, CODING_LINE + COPYRIGHT)
- old.gsub!(/\A(#{Regexp.escape(CODING_LINE)})?/, CODING_LINE + COPYRIGHT + "\n")
- end
- File.open(file, 'w+') {|f| f.puts(old)}
- end
- end
- puts "Look through the above mentioned files and correct all problems" if inserted
- end
-
- desc "Check for MathjaxNode availability"
- task :test_mathjaxnode_deps do
- html = %x{echo '$$a$$' | \
- #{RbConfig.ruby} -Ilib bin/kramdown --no-config-file --math-engine mathjaxnode}
- raise (<\Z}m === html
-The MathjaxNode engine is not available. Try "npm install mathjax-node-cli".
-MJN
- puts "MathjaxNode is available, and its default configuration works."
- end
-
- desc "Update kramdown MathjaxNode test reference outputs"
- task update_mathjaxnode_tests: [:test_mathjaxnode_deps] do
- # Not framed in terms of rake file tasks to prevent accidental overwrites.
- Dir['test/testcases/**/mathjaxnode*.text'].each do |f|
- stem = f[0..-6] # Remove .text
- ruby "-Ilib bin/kramdown --config-file #{stem}.options #{f} >#{stem}.html.19"
- end
- end
-
- desc "Check for SsKaTeX availability"
- task :test_sskatex_deps do
- katexjs = 'katex/katex.min.js'
- raise (<#{stem}.html.19"
- end
- end
-
- desc "Update kramdown KaTeX test reference outputs"
- task :update_katex_tests do
- # Not framed in terms of rake file tasks to prevent accidental overwrites.
- Dir['test/testcases/**/katex*.text'].each do |f|
- stem = f[0..-6] # Remove .text
- ruby "-Ilib bin/kramdown --config-file #{stem}.options #{f} >#{stem}.html.19"
- end
- end
-end
-
-task :gemspec => ['dev:gemspec']
-
-task :clobber => ['dev:clobber']
diff --git a/benchmark/benchmark.rb b/benchmark/benchmark.rb
deleted file mode 100644
index bad86af1..00000000
--- a/benchmark/benchmark.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-require 'benchmark'
-require 'stringio'
-
-require 'kramdown'
-require 'bluecloth'
-require 'maruku'
-require 'maruku/version'
-require 'rdiscount'
-require 'bluefeather'
-require 'redcarpet'
-
-module MaRuKu::Errors
- def tell_user(s)
- end
-end
-
-
-RUNS=20
-
-FILES=['mdsyntax.text', 'mdbasics.text']
-
-puts "Running tests on #{Time.now.strftime("%Y-%m-%d")} under #{RUBY_DESCRIPTION}"
-
-FILES.each do |file|
- data = File.read(File.join(File.dirname(__FILE__), file))
- puts
- puts "Test using file #{file} and #{RUNS} runs"
- results = Benchmark.bmbm do |b|
- b.report("kramdown #{Kramdown::VERSION}") { RUNS.times { Kramdown::Document.new(data).to_html } }
- b.report("Maruku #{MaRuKu::Version}") { RUNS.times { Maruku.new(data, :on_error => :ignore).to_html } }
- b.report("BlueFeather #{BlueFeather::VERSION}") { RUNS.times { BlueFeather.parse(data) } }
- b.report("BlueCloth #{BlueCloth::VERSION}") { RUNS.times { BlueCloth.new(data).to_html } }
- b.report("RDiscount #{RDiscount::VERSION}") { RUNS.times { RDiscount.new(data).to_html } }
- b.report("redcarpet #{Redcarpet::VERSION}") { RUNS.times { Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(data) } }
- end
-
- puts
- puts "Real time of X divided by real time of kramdown"
- kd = results.shift.real
- %w[Maruku BlueFeather BlueCloth RDiscount redcarpet].each do |name|
- puts name.ljust(19) << (results.shift.real/kd).round(4).to_s
- end
-end
diff --git a/benchmark/benchmark.sh b/benchmark/benchmark.sh
deleted file mode 100755
index 3fe600c3..00000000
--- a/benchmark/benchmark.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-
-source ~/.profile
-
-RUBY_VERSIONS=`rvm list strings | sort`
-KD_VERSIONS="`git tag | sort -V` master"
-OTHERS=false
-AVERAGE=1
-MASTER_AS=master
-
-while getopts "r:k:om:a:" optname; do
- case "$optname" in
- "r")
- RUBY_VERSIONS="$OPTARG"
- ;;
- "k")
- KD_VERSIONS="$OPTARG"
- ;;
- "o")
- OTHERS=true
- ;;
- "m")
- MASTER_AS="$OPTARG"
- ;;
- "a")
- AVERAGE="$OPTARG"
- ;;
- "?")
- echo "Unknown option $OPTARG"
- exit 1
- ;;
- ":")
- echo "No argument value for option $OPTARG"
- exit 1
- ;;
- *)
- echo "Unknown error while processing options"
- exit 1
- ;;
- esac
-done
-
-TMPDIR=/tmp/kramdown-benchmark
-
-rm -rf $TMPDIR
-mkdir -p $TMPDIR
-cp benchmark/md* $TMPDIR
-cp benchmark/generate_data.rb $TMPDIR
-git clone .git ${TMPDIR}/kramdown
-cd ${TMPDIR}/kramdown
-
-for RUBY_VERSION in $RUBY_VERSIONS; do
- rvm use $RUBY_VERSION
- echo "Creating benchmark data for $(ruby -v)"
-
- for KD_VERSION in $KD_VERSIONS; do
- echo "Using kramdown version $KD_VERSION"
- git co $KD_VERSION 2>/dev/null
- if [ -z $MASTER_AS -o $KD_VERSION != master ]; then
- VNUM=${KD_VERSION}
- else
- VNUM=$MASTER_AS
- fi
- ruby -I${TMPDIR}/kramdown/lib ../generate_data.rb -k ${VNUM} -a ${AVERAGE} >/dev/null
- done
-
- if [ $OTHERS = "true" ]; then
- ruby -rubygems -I${TMPDIR}/kramdown/lib ../generate_data.rb -o >/dev/null
- fi
-done
-
-cd ${TMPDIR}
-rvm default
-ruby generate_data.rb -g
diff --git a/benchmark/generate_data.rb b/benchmark/generate_data.rb
deleted file mode 100644
index 762ebc3d..00000000
--- a/benchmark/generate_data.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-require 'benchmark'
-require 'optparse'
-require 'fileutils'
-
-require 'kramdown'
-
-options = {:others => false, :average => 1}
-OptionParser.new do |opts|
- opts.on("-a AVG", "--average AVG", Integer, "Average times over the specified number of runs") {|v| options[:average] = v }
- opts.on("-o", "--[no-]others", "Generate data for other parsers") {|v| options[:others] = v}
- opts.on("-g", "--[no-]graph", "Generate graph") {|v| options[:graph] = v}
- opts.on("-k VERSION", "--kramdown VERSION", String, "Add benchmark data for kramdown version VERSION") {|v| options[:kramdown] = v}
-end.parse!
-
-THISRUBY = (self.class.const_defined?(:RUBY_DESCRIPTION) ? RUBY_DESCRIPTION.scan(/^.*?(?=\s*\()/).first.sub(/\s/, '-') : "ruby-#{RUBY_VERSION}") + '-' + RUBY_PATCHLEVEL.to_s
-
-Dir.chdir(File.dirname(__FILE__))
-BMDATA = File.read('mdbasics.text')
-MULTIPLIER = (0..5).map {|i| 2**i}
-
-if options[:others]
- require 'maruku'
- require 'maruku/version'
- begin
- require 'rdiscount'
- rescue LoadError
- end
- #require 'bluefeather'
-
- module MaRuKu::Errors
- def tell_user(s)
- end
- end
-
- bmdata = {}
- labels = []
- MULTIPLIER.each do |i|
- $stderr.puts "Generating benchmark data for other parsers, multiplier #{i}"
- mddata = BMDATA*i
- labels = []
- bmdata[i] = Benchmark::bmbm do |x|
- labels << "Maruku #{MaRuKu::Version}"
- x.report { Maruku.new(mddata, :on_error => :ignore).to_html }
- if self.class.const_defined?(:BlueFeather)
- labels << "BlueFeather #{BlueFeather::VERSION}"
- x.report { BlueFeather.parse(mddata) }
- end
- if self.class.const_defined?(:RDiscount)
- labels << "RDiscount #{RDiscount::VERSION}"
- x.report { RDiscount.new(mddata).to_html }
- end
- end
- end
- File.open("static-#{THISRUBY}.dat", 'w+') do |f|
- f.puts "# " + labels.join(" || ")
- format_str = "%5d" + " %10.5f"*bmdata[MULTIPLIER.first].size
- bmdata.sort.each do |m,v|
- f.puts format_str % [m, *v.map {|tms| tms.real}]
- end
- end
-end
-
-if options[:kramdown]
- kramdown = "kramdown-#{THISRUBY}.dat"
- data = if File.exist?(kramdown)
- lines = File.readlines(kramdown).map {|l| l.chomp}
- lines.first << " || "
- lines
- else
- ["# ", *MULTIPLIER.map {|m| "%3d" % m}]
- end
- data.first << "#{options[:kramdown]}".rjust(10)
-
- times = []
- options[:average].times do
- MULTIPLIER.each_with_index do |m, i|
- $stderr.puts "Generating benchmark data for kramdown version #{options[:kramdown]}, multiplier #{m}"
- mddata = BMDATA*m
- begin
- (times[i] ||= []) << Benchmark::bmbm {|x| x.report { Kramdown::Document.new(mddata).to_html } }.first.real
- rescue
- $stderr.puts $!.message
- (times[i] ||= []) << 0
- end
- end
- end
- times.each_with_index {|t,i| data[i+1] << "%14.5f" % (t.inject(0) {|sum,v| sum+v}/3.0)}
- File.open(kramdown, 'w+') do |f|
- data.each {|l| f.puts l}
- end
-end
-
-if options[:graph]
- Dir['kramdown-*.dat'].each do |kramdown_name|
- theruby = kramdown_name.sub(/^kramdown-/, '').sub(/\.dat$/, '')
- graph_name = "graph-#{theruby}.png"
- static_name = "static-#{theruby}.dat"
- kramdown_names = File.readlines(kramdown_name).first.chomp[1..-1].split(/\s*\|\|\s*/)
- static_names = (File.exist?(static_name) ? File.readlines(static_name).first.chomp[1..-1].split(/\s*\|\|\s*/) : [])
- File.open("gnuplot.dat", "w+") do |f|
- f.puts <