kramdown 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kramdown might be problematic. Click here for more details.

Files changed (94) hide show
  1. data/CONTRIBUTERS +1 -1
  2. data/ChangeLog +532 -0
  3. data/README +22 -12
  4. data/Rakefile +9 -8
  5. data/VERSION +1 -1
  6. data/benchmark/benchmark.sh +61 -0
  7. data/benchmark/generate_data.rb +57 -55
  8. data/benchmark/testing.sh +1 -1
  9. data/benchmark/timing.sh +3 -3
  10. data/bin/kramdown +1 -2
  11. data/data/kramdown/document.html +2 -2
  12. data/data/kramdown/document.latex +2 -2
  13. data/doc/default.scss.css +6 -1
  14. data/doc/default.template +1 -1
  15. data/doc/documentation.page +1 -1
  16. data/doc/index.page +9 -7
  17. data/doc/installation.page +2 -3
  18. data/doc/links.markdown +1 -1
  19. data/doc/quickref.page +19 -19
  20. data/doc/syntax.page +117 -98
  21. data/doc/tests.page +8 -7
  22. data/lib/kramdown/compatibility.rb +2 -1
  23. data/lib/kramdown/converter.rb +5 -7
  24. data/lib/kramdown/converter/base.rb +87 -32
  25. data/lib/kramdown/converter/html.rb +134 -122
  26. data/lib/kramdown/converter/kramdown.rb +24 -25
  27. data/lib/kramdown/converter/latex.rb +65 -55
  28. data/lib/kramdown/document.rb +487 -42
  29. data/lib/kramdown/error.rb +3 -0
  30. data/lib/kramdown/options.rb +83 -28
  31. data/lib/kramdown/parser.rb +5 -5
  32. data/lib/kramdown/parser/base.rb +55 -13
  33. data/lib/kramdown/parser/html.rb +83 -71
  34. data/lib/kramdown/parser/kramdown.rb +73 -54
  35. data/lib/kramdown/parser/kramdown/abbreviation.rb +17 -12
  36. data/lib/kramdown/parser/kramdown/autolink.rb +2 -3
  37. data/lib/kramdown/parser/kramdown/blank_line.rb +1 -1
  38. data/lib/kramdown/parser/kramdown/block_boundary.rb +2 -2
  39. data/lib/kramdown/parser/kramdown/blockquote.rb +2 -2
  40. data/lib/kramdown/parser/kramdown/codeblock.rb +5 -2
  41. data/lib/kramdown/parser/kramdown/codespan.rb +1 -2
  42. data/lib/kramdown/parser/kramdown/emphasis.rb +1 -1
  43. data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
  44. data/lib/kramdown/parser/kramdown/extensions.rb +204 -0
  45. data/lib/kramdown/parser/kramdown/footnote.rb +7 -7
  46. data/lib/kramdown/parser/kramdown/header.rb +4 -2
  47. data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
  48. data/lib/kramdown/parser/kramdown/html.rb +39 -45
  49. data/lib/kramdown/parser/kramdown/link.rb +19 -29
  50. data/lib/kramdown/parser/kramdown/list.rb +13 -13
  51. data/lib/kramdown/parser/kramdown/math.rb +1 -1
  52. data/lib/kramdown/parser/kramdown/paragraph.rb +5 -4
  53. data/lib/kramdown/parser/kramdown/smart_quotes.rb +1 -1
  54. data/lib/kramdown/parser/kramdown/table.rb +51 -12
  55. data/lib/kramdown/parser/markdown.rb +69 -0
  56. data/lib/kramdown/utils.rb +2 -2
  57. data/lib/kramdown/utils/entities.rb +10 -1
  58. data/lib/kramdown/utils/html.rb +22 -11
  59. data/lib/kramdown/utils/ordered_hash.rb +44 -40
  60. data/lib/kramdown/version.rb +1 -1
  61. data/man/man1/kramdown.1 +31 -4
  62. data/test/testcases/block/08_list/item_ial.html +1 -1
  63. data/test/testcases/block/11_ial/nested.html +11 -0
  64. data/test/testcases/block/11_ial/nested.text +15 -0
  65. data/test/testcases/block/13_definition_list/item_ial.html +1 -1
  66. data/test/testcases/block/14_table/escaping.html +52 -0
  67. data/test/testcases/block/14_table/escaping.text +19 -0
  68. data/test/testcases/block/14_table/simple.html.19 +139 -0
  69. data/test/testcases/block/14_table/simple.text +1 -1
  70. data/test/testcases/block/15_math/normal.html +13 -13
  71. data/test/testcases/block/16_toc/{no_toc_depth.html → no_toc.html} +0 -0
  72. data/test/testcases/block/16_toc/{no_toc_depth.options → no_toc.options} +0 -0
  73. data/test/testcases/block/16_toc/{no_toc_depth.text → no_toc.text} +0 -0
  74. data/test/testcases/block/16_toc/{toc_depth_2.html → toc_levels.html} +4 -4
  75. data/test/testcases/block/16_toc/toc_levels.options +1 -0
  76. data/test/testcases/block/16_toc/{toc_depth_2.text → toc_levels.text} +0 -0
  77. data/test/testcases/span/escaped_chars/normal.html +4 -0
  78. data/test/testcases/span/escaped_chars/normal.text +4 -0
  79. data/test/testcases/span/ial/simple.html +1 -1
  80. data/test/testcases/span/math/normal.html +2 -2
  81. metadata +20 -25
  82. data/benchmark/historic-jruby-1.4.0.dat +0 -7
  83. data/benchmark/historic-ruby-1.8.6.dat +0 -7
  84. data/benchmark/historic-ruby-1.8.7.dat +0 -7
  85. data/benchmark/historic-ruby-1.9.1p243.dat +0 -7
  86. data/benchmark/historic-ruby-1.9.2dev.dat +0 -7
  87. data/benchmark/static-jruby-1.4.0.dat +0 -7
  88. data/benchmark/static-ruby-1.8.6.dat +0 -7
  89. data/benchmark/static-ruby-1.8.7.dat +0 -7
  90. data/benchmark/static-ruby-1.9.1p243.dat +0 -7
  91. data/benchmark/static-ruby-1.9.2dev.dat +0 -7
  92. data/lib/kramdown/parser/kramdown/attribute_list.rb +0 -111
  93. data/lib/kramdown/parser/kramdown/extension.rb +0 -116
  94. data/test/testcases/block/16_toc/toc_depth_2.options +0 -1
data/README CHANGED
@@ -1,13 +1,21 @@
1
- # kramdown
1
+ = kramdown
2
2
 
3
3
  kramdown is yet-another-markdown-parser but fast, pure Ruby, using a strict syntax definition and
4
- supporting several common extensions.
4
+ supporting several common extensions. The syntax definition for the kramdown syntax can be found in
5
+ doc/syntax.page and a quick reference is available in doc/quickref.page.
5
6
 
6
- The syntax definition can be found in doc/syntax.page, a quick reference in doc/quickref.page. All
7
- the documentation is available online at http://kramdown.rubyforge.org.
7
+ The kramdown library is mainly written to support the kramdown-to-HTML conversion chain. However,
8
+ due to its flexibility it supports other input and output formats as well. Here is a list of the
9
+ supported formats:
8
10
 
11
+ * input formats: kramdown (a Markdown superset), Markdown, HTML
12
+ * output formats: HTML, kramdown, LaTeX (and therefore PDF)
9
13
 
10
- # Usage
14
+ All the documentation on the available input and output formats is available in the doc/ directory
15
+ and online at http://kramdown.rubyforge.org.
16
+
17
+
18
+ == Usage
11
19
 
12
20
  kramdown has a basic *Cloth API, so using kramdown is as easy as
13
21
 
@@ -15,16 +23,18 @@ kramdown has a basic *Cloth API, so using kramdown is as easy as
15
23
 
16
24
  Kramdown::Document.new(text).to_html
17
25
 
26
+ For detailed information have a look at the API documentation of the Kramdown::Document class.
27
+
18
28
 
19
- # Development
29
+ == Development
20
30
 
21
- Just clone the git repository as described in doc/installation.page you are good to go. You probably
22
- want to install `rake` so that you can use the provided rake tasks. Aside from that:
31
+ Just clone the git repository as described in doc/installation.page and you are good to go. You
32
+ probably want to install `rake` so that you can use the provided rake tasks. Aside from that:
23
33
 
24
- * The `tidy` binary needs to be installed for the automatically derived tests to work.
25
- * The `latex` binary needs to be installed for the latex-compilation tests to work.
34
+ * The +tidy+ binary needs to be installed for the automatically derived tests to work.
35
+ * The +latex+ binary needs to be installed for the latex-compilation tests to work.
26
36
 
27
37
 
28
- # License
38
+ == License
29
39
 
30
- See the COPYING file.
40
+ GPLv3 - see the COPYING file.
data/Rakefile CHANGED
@@ -15,6 +15,7 @@ rescue LoadError
15
15
  end
16
16
 
17
17
  begin
18
+ gem 'rdoc' if RUBY_VERSION >= '1.9'
18
19
  require 'rdoc/task'
19
20
  require 'rdoc/rdoc'
20
21
  rescue LoadError
@@ -73,17 +74,16 @@ if defined? Webgen
73
74
  end
74
75
  end
75
76
 
76
- if defined? Rake::RDocTask
77
- rd = Rake::RDocTask.new do |rdoc|
77
+ if defined? RDoc::Task
78
+ rd = RDoc::Task.new do |rdoc|
78
79
  rdoc.rdoc_dir = 'htmldoc/rdoc'
79
80
  rdoc.title = 'kramdown'
80
- rdoc.main = 'Kramdown'
81
- rdoc.options << '--line-numbers'
82
- rdoc.rdoc_files.include('lib/**/*.rb')
81
+ rdoc.main = 'README'
82
+ rdoc.rdoc_files.include('lib', 'README')
83
83
  end
84
84
  end
85
85
 
86
- if defined?(Webgen) && defined?(Rake::RDocTask)
86
+ if defined?(Webgen) && defined?(RDoc::Task)
87
87
  desc "Build the whole user documentation"
88
88
  task :doc => [:rdoc, 'htmldoc']
89
89
  end
@@ -176,7 +176,8 @@ EOF
176
176
  #### Documentation
177
177
 
178
178
  s.has_rdoc = true
179
- s.rdoc_options = ['--line-numbers', '--main', 'Kramdown']
179
+ s.rdoc_options = ['--main', 'README']
180
+ s.extra_rdoc_files = 'README'
180
181
 
181
182
  #### Author and project details
182
183
 
@@ -236,7 +237,7 @@ EOF
236
237
 
237
238
  desc "Upload the website to Rubyforge"
238
239
  task :publish_website => ['doc'] do
239
- sh "rsync -avc --delete --exclude 'wiki' --exclude 'js/jsMath' --exclude 'robots.txt' htmldoc/ gettalong@rubyforge.org:/var/www/gforge-projects/kramdown/"
240
+ sh "rsync -avc --delete --exclude 'MathJax' --exclude 'robots.txt' htmldoc/ gettalong@rubyforge.org:/var/www/gforge-projects/kramdown/"
240
241
  end
241
242
 
242
243
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.12.0
@@ -0,0 +1,61 @@
1
+ #!/bin/bash
2
+
3
+ source ~/.bashrc
4
+
5
+ RUBY_VERSIONS=`rvm list strings | sort`
6
+ KD_VERSIONS="`git tag | sort -V` master"
7
+ OTHERS=false
8
+
9
+ while getopts "r:k:o" optname; do
10
+ case "$optname" in
11
+ "r")
12
+ RUBY_VERSIONS="$OPTARG"
13
+ ;;
14
+ "k")
15
+ KD_VERSIONS="$OPTARG"
16
+ ;;
17
+ "o")
18
+ OTHERS=true
19
+ ;;
20
+ "?")
21
+ echo "Unknown option $OPTARG"
22
+ exit 1
23
+ ;;
24
+ ":")
25
+ echo "No argument value for option $OPTARG"
26
+ exit 1
27
+ ;;
28
+ *)
29
+ echo "Unknown error while processing options"
30
+ exit 1
31
+ ;;
32
+ esac
33
+ done
34
+
35
+ TMPDIR=/tmp/kramdown-benchmark
36
+
37
+ rm -rf $TMPDIR
38
+ mkdir -p $TMPDIR
39
+ cp benchmark/md* $TMPDIR
40
+ cp benchmark/generate_data.rb $TMPDIR
41
+ git clone .git ${TMPDIR}/kramdown
42
+ cd ${TMPDIR}/kramdown
43
+
44
+ for RUBY_VERSION in $RUBY_VERSIONS; do
45
+ rvm $RUBY_VERSION
46
+ echo "Creating benchmark data for $(ruby -v)"
47
+
48
+ for KD_VERSION in $KD_VERSIONS; do
49
+ echo "Using kramdown version $KD_VERSION"
50
+ git co $KD_VERSION 2>/dev/null
51
+ ruby -I${TMPDIR}/kramdown/lib ../generate_data.rb -k ${KD_VERSION} >/dev/null
52
+ done
53
+
54
+ if [ $OTHERS = "true" ]; then
55
+ ruby -rubygems -I${TMPDIR}/kramdown/lib ../generate_data.rb -o >/dev/null
56
+ fi
57
+ done
58
+
59
+ cd ${TMPDIR}
60
+ rvm default
61
+ ruby generate_data.rb -g
@@ -3,93 +3,95 @@ require 'optparse'
3
3
  require 'fileutils'
4
4
 
5
5
  require 'kramdown'
6
- require 'maruku'
7
- require 'maruku/version'
8
- begin
9
- require 'rdiscount'
10
- require 'bluecloth'
11
- rescue LoadError
12
- end
13
- require 'bluefeather'
14
6
 
15
- module MaRuKu::Errors
16
- def tell_user(s)
17
- end
18
- end
19
-
20
- options = {:static => false}
7
+ options = {:others => false}
21
8
  OptionParser.new do |opts|
22
- opts.on("-s", "--[no-]static", "Generate static data") {|v| options[:static] = v}
9
+ opts.on("-o", "--[no-]others", "Generate data for other parsers") {|v| options[:others] = v}
23
10
  opts.on("-g", "--[no-]graph", "Generate graph") {|v| options[:graph] = v}
24
- opts.on("-h NAME", "--historic NAME", String, "Add historic benchmark data") {|v| options[:historic] = v}
11
+ opts.on("-k VERSION", "--kramdown VERSION", String, "Add benchmark data for kramdown version VERSION") {|v| options[:kramdown] = v}
25
12
  end.parse!
26
13
 
27
14
 
28
- THISRUBY = (self.class.const_defined?(:RUBY_DESCRIPTION) ? RUBY_DESCRIPTION.scan(/^.*?(?=\s*\()/).first.sub(/\s/, '-') : "ruby-#{RUBY_VERSION}")
15
+ THISRUBY = (self.class.const_defined?(:RUBY_DESCRIPTION) ? RUBY_DESCRIPTION.scan(/^.*?(?=\s*\()/).first.sub(/\s/, '-') : "ruby-#{RUBY_VERSION}") + '-' + RUBY_PATCHLEVEL.to_s
29
16
 
30
17
  Dir.chdir(File.dirname(__FILE__))
31
- $:.unshift "../lib"
32
18
  BMDATA = File.read('mdbasics.text')
33
19
  MULTIPLIER = (0..5).map {|i| 2**i}
34
20
 
35
- if options[:static]
36
- static = {}
37
- 2.times do
38
- MULTIPLIER.each do |i|
39
- $stderr.puts "Generating static benchmark data, multiplier #{i}"
40
- mddata = BMDATA*i
41
- static[i] = []
42
- static[i] << ["Maruku #{MaRuKu::Version}", Benchmark::measure { Maruku.new(mddata, :on_error => :ignore).to_html }.real]
43
- static[i] << ["BlueFeather #{BlueFeather::VERSION}", Benchmark::measure { BlueFeather.parse(mddata) }.real]
44
- if self.class.const_defined?(:BlueCloth)
45
- static[i] << ["BlueCloth #{BlueCloth::VERSION}", Benchmark::measure { BlueCloth.new(mddata).to_html }.real]
46
- else
47
- static[i] << ["BlueCloth Not Available.", 0]
21
+ if options[:others]
22
+ require 'maruku'
23
+ require 'maruku/version'
24
+ begin
25
+ require 'rdiscount'
26
+ rescue LoadError
27
+ end
28
+ #require 'bluefeather'
29
+
30
+ module MaRuKu::Errors
31
+ def tell_user(s)
32
+ end
33
+ end
34
+
35
+ bmdata = {}
36
+ labels = []
37
+ MULTIPLIER.each do |i|
38
+ $stderr.puts "Generating benchmark data for other parsers, multiplier #{i}"
39
+ mddata = BMDATA*i
40
+ labels = []
41
+ bmdata[i] = Benchmark::bmbm do |x|
42
+ labels << "Maruku #{MaRuKu::Version}"
43
+ x.report { Maruku.new(mddata, :on_error => :ignore).to_html }
44
+ if self.class.const_defined?(:BlueFeather)
45
+ labels << "BlueFeather #{BlueFeather::VERSION}"
46
+ x.report { BlueFeather.parse(mddata) }
48
47
  end
49
48
  if self.class.const_defined?(:RDiscount)
50
- static[i] << ["RDiscount #{RDiscount::VERSION}", Benchmark::measure { RDiscount.new(mddata).to_html }.real]
51
- else
52
- static[i] << ["RDiscount Not Available.", 0]
49
+ labels << "RDiscount #{RDiscount::VERSION}"
50
+ x.report { RDiscount.new(mddata).to_html }
53
51
  end
54
52
  end
55
53
  end
56
54
  File.open("static-#{THISRUBY}.dat", 'w+') do |f|
57
- f.puts "# " + static[MULTIPLIER.first].map {|name, val| name }.join(" || ")
58
- format_str = "%5d" + " %10.5f"*static[MULTIPLIER.first].size
59
- static.sort.each do |m,v|
60
- f.puts format_str % [m, *v.map {|name,val| val}]
55
+ f.puts "# " + labels.join(" || ")
56
+ format_str = "%5d" + " %10.5f"*bmdata[MULTIPLIER.first].size
57
+ bmdata.sort.each do |m,v|
58
+ f.puts format_str % [m, *v.map {|tms| tms.real}]
61
59
  end
62
60
  end
63
61
  end
64
62
 
65
- if options[:historic]
66
- historic = "historic-#{THISRUBY}.dat"
67
- data = if File.exist?(historic)
68
- lines = File.readlines(historic).map {|l| l.chomp}
63
+ if options[:kramdown]
64
+ kramdown = "kramdown-#{THISRUBY}.dat"
65
+ data = if File.exist?(kramdown)
66
+ lines = File.readlines(kramdown).map {|l| l.chomp}
69
67
  lines.first << " || "
70
68
  lines
71
69
  else
72
- ["# ", *MULTIPLIER.map {|m| "%5d" % m}]
70
+ ["# ", *MULTIPLIER.map {|m| "%3d" % m}]
73
71
  end
74
- data.first << " #{options[:historic]}"
72
+ data.first << "#{options[:kramdown]}".rjust(10)
75
73
  MULTIPLIER.each_with_index do |m, i|
76
- $stderr.puts "Generating historic benchmark data, multiplier #{m}"
74
+ $stderr.puts "Generating benchmark data for kramdown version #{options[:kramdown]}, multiplier #{m}"
77
75
  mddata = BMDATA*m
78
- Benchmark::measure { Kramdown::Document.new(mddata).to_html }
79
- data[i+1] << " %10.5f" % Benchmark::measure { Kramdown::Document.new(mddata).to_html }.real
76
+ begin
77
+ data[i+1] << "%14.5f" % Benchmark::bmbm {|x| x.report { Kramdown::Document.new(mddata).to_html } }.first.real
78
+ rescue
79
+ $stderr.puts $!.message
80
+ data[i+1] << "%14.5f" % 0
81
+ end
80
82
  end
81
- File.open(historic, 'w+') do |f|
83
+ File.open(kramdown, 'w+') do |f|
82
84
  data.each {|l| f.puts l}
83
85
  end
84
86
  end
85
87
 
86
88
  if options[:graph]
87
- Dir['historic-*.dat'].each do |historic_name|
88
- theruby = historic_name.sub(/^historic-/, '').sub(/\.dat$/, '')
89
+ Dir['kramdown-*.dat'].each do |kramdown_name|
90
+ theruby = kramdown_name.sub(/^kramdown-/, '').sub(/\.dat$/, '')
89
91
  graph_name = "graph-#{theruby}.png"
90
- #static_name = "static-#{theruby}.dat"
91
- historic_names = File.readlines(historic_name).first.chomp[1..-1].split(/\s*\|\|\s*/)
92
- #static_names = (File.exist?(static_name) ? File.readlines(static_name).first.chomp[1..-1].split(/\s*\|\|\s*/) : [])
92
+ static_name = "static-#{theruby}.dat"
93
+ kramdown_names = File.readlines(kramdown_name).first.chomp[1..-1].split(/\s*\|\|\s*/)
94
+ static_names = (File.exist?(static_name) ? File.readlines(static_name).first.chomp[1..-1].split(/\s*\|\|\s*/) : [])
93
95
  File.open("gnuplot.dat", "w+") do |f|
94
96
  f.puts <<EOF
95
97
  set title "Execution Time Performance for #{theruby}"
@@ -102,8 +104,8 @@ set output "#{graph_name}"
102
104
  EOF
103
105
  f.print "plot "
104
106
  i, j = 1, 1
105
- f.puts((historic_names.map {|n| i += 1; "\"#{historic_name}\" using 1:#{i} with lp title \"#{n}\""}
106
- #static_names.map {|n| j += 1; n =~ /bluefeather/i ? nil : "\"#{static_name}\" using 1:#{j} with lp title \"#{n}\""}.compact
107
+ f.puts((kramdown_names.map {|n| i += 1; "\"#{kramdown_name}\" using 1:#{i} with lp title \"#{n}\""} +
108
+ static_names.map {|n| j += 1; n =~ /bluefeather/i ? nil : "\"#{static_name}\" using 1:#{j} with lp title \"#{n}\""}.compact
107
109
  ).join(", "))
108
110
  end
109
111
  `gnuplot gnuplot.dat`
@@ -2,7 +2,7 @@
2
2
 
3
3
  source ~/.bashrc
4
4
 
5
- for VERSION in `rvm list strings`; do
5
+ for VERSION in `rvm list strings | sort`; do
6
6
  rvm $VERSION
7
7
  echo $(ruby -v)
8
8
  RUBYOPT=-rubygems rake test
@@ -2,9 +2,9 @@
2
2
 
3
3
  source ~/.bashrc
4
4
 
5
- for VERSION in 1.8.6 1.8.7 1.9.1 1.9.2; do
5
+ for VERSION in `rvm list strings | sort`; do
6
6
  rvm $VERSION
7
7
  echo $(ruby -v)
8
- ruby -Ilib bin/kramdown < benchmark/mdsyntax.text 2>&1 > /dev/null
9
- time ruby -Ilib bin/kramdown < benchmark/mdsyntax.text > /dev/null
8
+ ruby -Ilib bin/kramdown < benchmark/mdsyntax.text 2>/dev/null >/dev/null
9
+ time ruby -Ilib bin/kramdown < benchmark/mdsyntax.text 2>/dev/null >/dev/null
10
10
  done
@@ -55,9 +55,8 @@ OptionParser.new do |opts|
55
55
  if definition.type == Kramdown::Options::Boolean
56
56
  opts.on("--[no-]#{no}") {|v| options[n] = Kramdown::Options.parse(n, v)}
57
57
  else
58
- next if definition.type == Object
59
58
  type = definition.type
60
- type = String if type == Symbol
59
+ type = String if type == Symbol || type == Object
61
60
  opts.on("--#{no} ARG", type) {|v| options[n] = Kramdown::Options.parse(n, v)}
62
61
  end
63
62
 
@@ -1,9 +1,9 @@
1
1
  <html>
2
2
  <head>
3
3
  <%
4
- extend ::Kramdown::Utils::HTML
4
+ extend ::Kramdown::Utils::Html
5
5
  title = ''
6
- h = @doc.tree.children.find {|c| c.type == :header}
6
+ h = @converter.root.children.find {|c| c.type == :header}
7
7
  if h
8
8
  collector = lambda {|c| c.children.collect {|cc| cc.type == :text ? escape_html(cc.value, :text) : collector.call(cc)}.join('')}
9
9
  title = collector.call(h)
@@ -29,10 +29,10 @@ encmap = {
29
29
  \usepackage[T1]{fontenc}
30
30
  \usepackage{listings}
31
31
  \usepackage{hyperref}
32
- <% @doc.conversion_infos[:packages].each {|pkg| %>\usepackage{<%= pkg %>}
32
+ <% @converter.data[:packages].each {|pkg| %>\usepackage{<%= pkg %>}
33
33
  <% } %>
34
34
 
35
- <% if @doc.conversion_infos[:packages].include?('fancyvrb') %>
35
+ <% if @converter.data[:packages].include?('fancyvrb') %>
36
36
  \VerbatimFootnotes
37
37
  <% end %>
38
38
 
@@ -231,7 +231,7 @@ body, table, code {
231
231
  }
232
232
 
233
233
  p, ul, ol, dl, table, pre, blockquote {
234
- margin: 20px 0px 0px
234
+ margin: 20px 0px 0px;
235
235
  }
236
236
 
237
237
  ul, ol {
@@ -252,6 +252,11 @@ body, table, code {
252
252
  dd {
253
253
  margin: 5px 0px 10px 20px;
254
254
  padding: 2px;
255
+
256
+ p, ul, ol, dl, table, pre, blockquote {
257
+ margin-top: 0px;
258
+ }
259
+
255
260
  }
256
261
 
257
262
  *:target::after {
@@ -8,7 +8,7 @@
8
8
  <meta name="keywords" content="ruby, kramdown, markdown, text markup" />
9
9
  <link href="{relocatable: default.css}" type="text/css" rel="stylesheet" media="screen,projection" />
10
10
  <link href="{relocatable: news.atom}" type="application/atom+xml" rel="alternate" />
11
- <script src="http://kramdown.rubyforge.org/js/jsMath/easy/load.js" type="text/javascript"></script>
11
+ <script src="http://kramdown.rubyforge.org/MathJax/MathJax.js" type="text/javascript"></script>
12
12
  <title>{title:} | kramdown</title>
13
13
  </head>
14
14
  <body>
@@ -9,7 +9,7 @@ kramdown is first and foremost a library for converting text written in a supers
9
9
  HTML. However, due to its modular architecture it is able to support additional input and output
10
10
  formats. The following input and output formats are currently supported:
11
11
 
12
- * Input: [kramdown](parser/kramdown.html) (a superset of Markdown), [html](parser/html.html)
12
+ * Input: [kramdown](parser/kramdown.html) (a superset of Markdown), [Markdown](parser/markdown.html), [html](parser/html.html)
13
13
  * Output: [HTML](converter/html.html), [LaTeX](converter/latex.html), [kramdown](converter/kramdown.html)
14
14
 
15
15
 
@@ -23,20 +23,22 @@ opts: |
23
23
  level 2 concept/.append style={font=\Large},
24
24
  }
25
25
  \node[concept, font=\Large] (lib) {kramdown's internal representation}
26
- child[concept color=orange, grow=150, ->] {node[concept] (i-kramdown) {kramdown}}
27
- child[concept color=orange, grow=210] {node[concept] (i-html) {HTML}}
26
+ child[concept color=orange, grow=140, ->] {node[concept] (i-kramdown) {kramdown}}
27
+ child[concept color=orange, grow=180] {node[concept] (i-html) {HTML}}
28
+ child[concept color=orange, grow=220] {node[concept] (i-markdown) {Markdown}}
28
29
  child[concept color=green!50!black, grow=40] {node[concept] (o-html) {HTML}}
29
30
  child[concept color=green!50!black, grow=0] {node[concept] (o-kramdown) {kramdown}}
30
- child[concept color=green!50!black, grow=-45] {
31
+ child[concept color=green!50!black, grow=-40] {
31
32
  node[concept] (o-latex) {\LaTeX}
32
33
  child[grow=0] {
33
34
  node[concept] (o-latex-pdf) {PDF}
34
35
  }
35
36
  }
36
- child[concept color=green!50!black, grow=-45] {node[concept] {\LaTeX}}
37
+ child[concept color=green!50!black, grow=-40] {node[concept] {\LaTeX}}
37
38
  ;
38
39
  \draw [dash pattern=on 0pt off 2pt,line width=5pt,arrows=-angle 60,shorten >=15pt,shorten <=10pt,color=orange]
39
40
  (i-kramdown) edge(lib)
41
+ (i-markdown) edge(lib)
40
42
  (i-html) edge (lib);
41
43
  \draw [dash pattern=on 0pt off 2pt,line width=5pt,arrows=-angle 60,shorten >=10pt,shorten <=15pt,color=green!50!black]
42
44
  (lib) edge(o-html)
@@ -84,11 +86,11 @@ Markdown implementations because kramdown borrowed many ideas from existing pack
84
86
  completely written in Ruby, supports standard Markdown (with some minor modifications) and various
85
87
  extensions that have been made popular by the [PHP Markdown Extra] package and [Maruku].
86
88
 
87
- It is probably the fastest pure-Ruby Markdown converter available (June 2010), being about 4x faster
88
- than [Maruku] and about 9x faster than [BlueFeather].
89
+ It is probably the fastest pure-Ruby Markdown converter available (November 2010), being about 4x
90
+ faster than [Maruku] and about 5x faster than [BlueFeather].
89
91
 
90
92
  <p class="a-center">
91
- The latest version of kramdown is <b>0.11.0</b> and it was released on <b>2010-10-01</b>.
93
+ The latest version of kramdown is <b>0.12.0</b> and it was released on <b>2010-11-01</b>.
92
94
  </p>
93
95
 
94
96
  [PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/