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.
- data/CONTRIBUTERS +1 -1
- data/ChangeLog +532 -0
- data/README +22 -12
- data/Rakefile +9 -8
- data/VERSION +1 -1
- data/benchmark/benchmark.sh +61 -0
- data/benchmark/generate_data.rb +57 -55
- data/benchmark/testing.sh +1 -1
- data/benchmark/timing.sh +3 -3
- data/bin/kramdown +1 -2
- data/data/kramdown/document.html +2 -2
- data/data/kramdown/document.latex +2 -2
- data/doc/default.scss.css +6 -1
- data/doc/default.template +1 -1
- data/doc/documentation.page +1 -1
- data/doc/index.page +9 -7
- data/doc/installation.page +2 -3
- data/doc/links.markdown +1 -1
- data/doc/quickref.page +19 -19
- data/doc/syntax.page +117 -98
- data/doc/tests.page +8 -7
- data/lib/kramdown/compatibility.rb +2 -1
- data/lib/kramdown/converter.rb +5 -7
- data/lib/kramdown/converter/base.rb +87 -32
- data/lib/kramdown/converter/html.rb +134 -122
- data/lib/kramdown/converter/kramdown.rb +24 -25
- data/lib/kramdown/converter/latex.rb +65 -55
- data/lib/kramdown/document.rb +487 -42
- data/lib/kramdown/error.rb +3 -0
- data/lib/kramdown/options.rb +83 -28
- data/lib/kramdown/parser.rb +5 -5
- data/lib/kramdown/parser/base.rb +55 -13
- data/lib/kramdown/parser/html.rb +83 -71
- data/lib/kramdown/parser/kramdown.rb +73 -54
- data/lib/kramdown/parser/kramdown/abbreviation.rb +17 -12
- data/lib/kramdown/parser/kramdown/autolink.rb +2 -3
- data/lib/kramdown/parser/kramdown/blank_line.rb +1 -1
- data/lib/kramdown/parser/kramdown/block_boundary.rb +2 -2
- data/lib/kramdown/parser/kramdown/blockquote.rb +2 -2
- data/lib/kramdown/parser/kramdown/codeblock.rb +5 -2
- data/lib/kramdown/parser/kramdown/codespan.rb +1 -2
- data/lib/kramdown/parser/kramdown/emphasis.rb +1 -1
- data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
- data/lib/kramdown/parser/kramdown/extensions.rb +204 -0
- data/lib/kramdown/parser/kramdown/footnote.rb +7 -7
- data/lib/kramdown/parser/kramdown/header.rb +4 -2
- data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
- data/lib/kramdown/parser/kramdown/html.rb +39 -45
- data/lib/kramdown/parser/kramdown/link.rb +19 -29
- data/lib/kramdown/parser/kramdown/list.rb +13 -13
- data/lib/kramdown/parser/kramdown/math.rb +1 -1
- data/lib/kramdown/parser/kramdown/paragraph.rb +5 -4
- data/lib/kramdown/parser/kramdown/smart_quotes.rb +1 -1
- data/lib/kramdown/parser/kramdown/table.rb +51 -12
- data/lib/kramdown/parser/markdown.rb +69 -0
- data/lib/kramdown/utils.rb +2 -2
- data/lib/kramdown/utils/entities.rb +10 -1
- data/lib/kramdown/utils/html.rb +22 -11
- data/lib/kramdown/utils/ordered_hash.rb +44 -40
- data/lib/kramdown/version.rb +1 -1
- data/man/man1/kramdown.1 +31 -4
- data/test/testcases/block/08_list/item_ial.html +1 -1
- data/test/testcases/block/11_ial/nested.html +11 -0
- data/test/testcases/block/11_ial/nested.text +15 -0
- data/test/testcases/block/13_definition_list/item_ial.html +1 -1
- data/test/testcases/block/14_table/escaping.html +52 -0
- data/test/testcases/block/14_table/escaping.text +19 -0
- data/test/testcases/block/14_table/simple.html.19 +139 -0
- data/test/testcases/block/14_table/simple.text +1 -1
- data/test/testcases/block/15_math/normal.html +13 -13
- data/test/testcases/block/16_toc/{no_toc_depth.html → no_toc.html} +0 -0
- data/test/testcases/block/16_toc/{no_toc_depth.options → no_toc.options} +0 -0
- data/test/testcases/block/16_toc/{no_toc_depth.text → no_toc.text} +0 -0
- data/test/testcases/block/16_toc/{toc_depth_2.html → toc_levels.html} +4 -4
- data/test/testcases/block/16_toc/toc_levels.options +1 -0
- data/test/testcases/block/16_toc/{toc_depth_2.text → toc_levels.text} +0 -0
- data/test/testcases/span/escaped_chars/normal.html +4 -0
- data/test/testcases/span/escaped_chars/normal.text +4 -0
- data/test/testcases/span/ial/simple.html +1 -1
- data/test/testcases/span/math/normal.html +2 -2
- metadata +20 -25
- data/benchmark/historic-jruby-1.4.0.dat +0 -7
- data/benchmark/historic-ruby-1.8.6.dat +0 -7
- data/benchmark/historic-ruby-1.8.7.dat +0 -7
- data/benchmark/historic-ruby-1.9.1p243.dat +0 -7
- data/benchmark/historic-ruby-1.9.2dev.dat +0 -7
- data/benchmark/static-jruby-1.4.0.dat +0 -7
- data/benchmark/static-ruby-1.8.6.dat +0 -7
- data/benchmark/static-ruby-1.8.7.dat +0 -7
- data/benchmark/static-ruby-1.9.1p243.dat +0 -7
- data/benchmark/static-ruby-1.9.2dev.dat +0 -7
- data/lib/kramdown/parser/kramdown/attribute_list.rb +0 -111
- data/lib/kramdown/parser/kramdown/extension.rb +0 -116
- data/test/testcases/block/16_toc/toc_depth_2.options +0 -1
data/README
CHANGED
@@ -1,13 +1,21 @@
|
|
1
|
-
|
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
|
7
|
-
|
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
|
-
|
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
|
-
|
29
|
+
== Development
|
20
30
|
|
21
|
-
Just clone the git repository as described in doc/installation.page you are good to go. You
|
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
|
25
|
-
* The
|
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
|
-
|
38
|
+
== License
|
29
39
|
|
30
|
-
|
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?
|
77
|
-
rd =
|
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 = '
|
81
|
-
rdoc.
|
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?(
|
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 = ['--
|
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 '
|
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.
|
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
|
data/benchmark/generate_data.rb
CHANGED
@@ -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
|
-
|
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("-
|
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("-
|
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[:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
51
|
-
|
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 "# " +
|
58
|
-
format_str = "%5d" + " %10.5f"*
|
59
|
-
|
60
|
-
f.puts format_str % [m, *v.map {|
|
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[:
|
66
|
-
|
67
|
-
data = if File.exist?(
|
68
|
-
lines = File.readlines(
|
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
|
-
["#
|
70
|
+
["# ", *MULTIPLIER.map {|m| "%3d" % m}]
|
73
71
|
end
|
74
|
-
data.first << "
|
72
|
+
data.first << "#{options[:kramdown]}".rjust(10)
|
75
73
|
MULTIPLIER.each_with_index do |m, i|
|
76
|
-
$stderr.puts "Generating
|
74
|
+
$stderr.puts "Generating benchmark data for kramdown version #{options[:kramdown]}, multiplier #{m}"
|
77
75
|
mddata = BMDATA*m
|
78
|
-
|
79
|
-
|
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(
|
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['
|
88
|
-
theruby =
|
89
|
+
Dir['kramdown-*.dat'].each do |kramdown_name|
|
90
|
+
theruby = kramdown_name.sub(/^kramdown-/, '').sub(/\.dat$/, '')
|
89
91
|
graph_name = "graph-#{theruby}.png"
|
90
|
-
|
91
|
-
|
92
|
-
|
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((
|
106
|
-
|
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`
|
data/benchmark/testing.sh
CHANGED
data/benchmark/timing.sh
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
source ~/.bashrc
|
4
4
|
|
5
|
-
for VERSION in
|
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
|
9
|
-
time ruby -Ilib bin/kramdown < benchmark/mdsyntax.text
|
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
|
data/bin/kramdown
CHANGED
@@ -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
|
|
data/data/kramdown/document.html
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
<html>
|
2
2
|
<head>
|
3
3
|
<%
|
4
|
-
extend ::Kramdown::Utils::
|
4
|
+
extend ::Kramdown::Utils::Html
|
5
5
|
title = ''
|
6
|
-
h = @
|
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
|
-
<% @
|
32
|
+
<% @converter.data[:packages].each {|pkg| %>\usepackage{<%= pkg %>}
|
33
33
|
<% } %>
|
34
34
|
|
35
|
-
<% if @
|
35
|
+
<% if @converter.data[:packages].include?('fancyvrb') %>
|
36
36
|
\VerbatimFootnotes
|
37
37
|
<% end %>
|
38
38
|
|
data/doc/default.scss.css
CHANGED
@@ -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 {
|
data/doc/default.template
CHANGED
@@ -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/
|
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>
|
data/doc/documentation.page
CHANGED
@@ -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
|
|
data/doc/index.page
CHANGED
@@ -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=
|
27
|
-
child[concept color=orange, grow=
|
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=-
|
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=-
|
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 (
|
88
|
-
than [Maruku] and about
|
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.
|
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/
|