kramdown 1.5.0 → 1.6.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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTERS +3 -1
  3. data/README.md +6 -6
  4. data/Rakefile +3 -3
  5. data/VERSION +1 -1
  6. data/bin/kramdown +1 -1
  7. data/doc/default.template +2 -2
  8. data/doc/index.page +21 -7
  9. data/doc/options.page +42 -3
  10. data/doc/sidebar.template +0 -7
  11. data/doc/sitemap.sitemap +5 -0
  12. data/doc/syntax.page +31 -3
  13. data/doc/virtual +3 -0
  14. data/lib/kramdown.rb +1 -1
  15. data/lib/kramdown/compatibility.rb +1 -1
  16. data/lib/kramdown/converter.rb +1 -1
  17. data/lib/kramdown/converter/base.rb +2 -1
  18. data/lib/kramdown/converter/html.rb +10 -5
  19. data/lib/kramdown/converter/kramdown.rb +13 -7
  20. data/lib/kramdown/converter/latex.rb +2 -1
  21. data/lib/kramdown/converter/math_engine/itex2mml.rb +1 -1
  22. data/lib/kramdown/converter/math_engine/mathjax.rb +18 -3
  23. data/lib/kramdown/converter/math_engine/ritex.rb +1 -1
  24. data/lib/kramdown/converter/pdf.rb +3 -2
  25. data/lib/kramdown/converter/remove_html_tags.rb +3 -1
  26. data/lib/kramdown/converter/syntax_highlighter.rb +53 -0
  27. data/lib/kramdown/converter/syntax_highlighter/coderay.rb +1 -1
  28. data/lib/kramdown/converter/syntax_highlighter/rouge.rb +2 -2
  29. data/lib/kramdown/converter/toc.rb +2 -2
  30. data/lib/kramdown/document.rb +5 -5
  31. data/lib/kramdown/element.rb +4 -1
  32. data/lib/kramdown/error.rb +1 -1
  33. data/lib/kramdown/options.rb +4 -3
  34. data/lib/kramdown/parser.rb +1 -1
  35. data/lib/kramdown/parser/base.rb +8 -4
  36. data/lib/kramdown/parser/gfm.rb +9 -1
  37. data/lib/kramdown/parser/html.rb +18 -3
  38. data/lib/kramdown/parser/kramdown.rb +8 -5
  39. data/lib/kramdown/parser/kramdown/abbreviation.rb +10 -2
  40. data/lib/kramdown/parser/kramdown/autolink.rb +1 -1
  41. data/lib/kramdown/parser/kramdown/blank_line.rb +1 -1
  42. data/lib/kramdown/parser/kramdown/block_boundary.rb +1 -1
  43. data/lib/kramdown/parser/kramdown/blockquote.rb +1 -1
  44. data/lib/kramdown/parser/kramdown/codeblock.rb +1 -1
  45. data/lib/kramdown/parser/kramdown/codespan.rb +1 -1
  46. data/lib/kramdown/parser/kramdown/emphasis.rb +2 -2
  47. data/lib/kramdown/parser/kramdown/eob.rb +1 -1
  48. data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
  49. data/lib/kramdown/parser/kramdown/extensions.rb +8 -7
  50. data/lib/kramdown/parser/kramdown/footnote.rb +11 -4
  51. data/lib/kramdown/parser/kramdown/header.rb +1 -1
  52. data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
  53. data/lib/kramdown/parser/kramdown/html.rb +7 -4
  54. data/lib/kramdown/parser/kramdown/html_entity.rb +1 -1
  55. data/lib/kramdown/parser/kramdown/line_break.rb +1 -1
  56. data/lib/kramdown/parser/kramdown/link.rb +8 -5
  57. data/lib/kramdown/parser/kramdown/list.rb +12 -7
  58. data/lib/kramdown/parser/kramdown/math.rb +3 -3
  59. data/lib/kramdown/parser/kramdown/paragraph.rb +3 -3
  60. data/lib/kramdown/parser/kramdown/smart_quotes.rb +1 -1
  61. data/lib/kramdown/parser/kramdown/table.rb +1 -1
  62. data/lib/kramdown/parser/kramdown/typographic_symbol.rb +1 -1
  63. data/lib/kramdown/parser/markdown.rb +2 -2
  64. data/lib/kramdown/utils.rb +1 -1
  65. data/lib/kramdown/utils/configurable.rb +1 -1
  66. data/lib/kramdown/utils/entities.rb +1 -1
  67. data/lib/kramdown/utils/html.rb +3 -1
  68. data/lib/kramdown/utils/ordered_hash.rb +1 -1
  69. data/lib/kramdown/utils/string_scanner.rb +8 -0
  70. data/lib/kramdown/utils/unidecoder.rb +1 -1
  71. data/lib/kramdown/version.rb +2 -2
  72. data/man/man1/kramdown.1 +1 -1
  73. data/test/run_tests.rb +1 -1
  74. data/test/test_files.rb +48 -17
  75. data/test/test_location.rb +8 -0
  76. data/test/test_string_scanner_kramdown.rb +8 -0
  77. data/test/testcases/block/04_header/atx_header.html +1 -1
  78. data/test/testcases/block/06_codeblock/highlighting-rouge.html +2 -2
  79. data/test/testcases/block/09_html/html_after_block.html +7 -0
  80. data/test/testcases/block/09_html/html_after_block.text +5 -0
  81. data/test/testcases/block/11_ial/simple.html +3 -1
  82. data/test/testcases/block/11_ial/simple.text +5 -1
  83. data/test/testcases/block/15_math/gh_128.html +1 -1
  84. data/test/testcases/block/15_math/mathjax_preview.html +4 -0
  85. data/test/testcases/block/15_math/mathjax_preview.options +2 -0
  86. data/test/testcases/block/15_math/mathjax_preview.text +5 -0
  87. data/test/testcases/block/15_math/mathjax_preview_simple.html +4 -0
  88. data/test/testcases/block/15_math/mathjax_preview_simple.options +2 -0
  89. data/test/testcases/block/15_math/mathjax_preview_simple.text +5 -0
  90. data/test/testcases/block/15_math/normal.html +1 -1
  91. data/test/testcases/block/16_toc/toc_exclude.html +7 -7
  92. data/test/testcases/block/16_toc/toc_levels.html +4 -4
  93. data/test/testcases/block/16_toc/toc_with_footnotes.html +1 -1
  94. data/test/testcases/span/01_link/empty_title.htmlinput +3 -0
  95. data/test/testcases/span/01_link/empty_title.text +7 -0
  96. data/test/testcases/span/01_link/link_defs_with_ial.html +4 -0
  97. data/test/testcases/span/01_link/link_defs_with_ial.text +16 -0
  98. data/test/testcases/span/02_emphasis/normal.html +2 -0
  99. data/test/testcases/span/02_emphasis/normal.text +2 -0
  100. data/test/testcases/span/04_footnote/markers.text +1 -0
  101. data/test/testcases/span/abbreviations/abbrev.html +3 -1
  102. data/test/testcases/span/abbreviations/abbrev.text +7 -0
  103. data/test/testcases/span/line_breaks/normal.html +2 -2
  104. data/test/testcases/span/line_breaks/normal.latex +2 -2
  105. metadata +20 -6
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,13 +1,13 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
8
8
  #
9
9
 
10
- require 'kramdown/parser/kramdown'
10
+ require 'kramdown/parser'
11
11
 
12
12
  module Kramdown
13
13
 
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,12 +1,14 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
8
8
  #
9
9
 
10
+ require 'rexml/parsers/baseparser'
11
+
10
12
  module Kramdown
11
13
 
12
14
  module Utils
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,4 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ #--
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
+ #
6
+ # This file is part of kramdown which is licensed under the MIT.
7
+ #++
8
+ #
9
+
2
10
 
3
11
  require 'strscan'
4
12
 
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -10,6 +10,6 @@
10
10
  module Kramdown
11
11
 
12
12
  # The kramdown version.
13
- VERSION = '1.5.0'
13
+ VERSION = '1.6.0'
14
14
 
15
15
  end
@@ -1,4 +1,4 @@
1
- .TH "KRAMDOWN" 1 "June 2014"
1
+ .TH "KRAMDOWN" 1 "February 2015"
2
2
  .SH NAME
3
3
  kramdown \- a fast, pure-Ruby Markdown-superset converter
4
4
  .SH SYNOPSIS
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  #--
4
- # Copyright (C) 2009-2014 Thomas Leitner <t_leitner@gmx.at>
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
5
  #
6
6
  # This file is part of kramdown which is licensed under the MIT.
7
7
  #++
@@ -41,10 +41,10 @@ class TestFiles < Minitest::Test
41
41
  end
42
42
  end
43
43
 
44
- # Generate test methods for html-to-html conversion
44
+ # Generate test methods for html-to-{html,kramdown} conversion
45
45
  `tidy -v 2>&1`
46
46
  if $?.exitstatus != 0
47
- warn("Skipping html-to-html tests because tidy executable is missing")
47
+ warn("Skipping html-to-{html,kramdown} tests because tidy executable is missing")
48
48
  else
49
49
  EXCLUDE_HTML_FILES = ['test/testcases/block/06_codeblock/whitespace.html', # bc of span inside pre
50
50
  'test/testcases/block/09_html/simple.html', # bc of xml elements
@@ -57,18 +57,34 @@ class TestFiles < Minitest::Test
57
57
  'test/testcases/span/math/ritex.html', # bc of tidy
58
58
  'test/testcases/block/15_math/itex2mml.html', # bc of tidy
59
59
  'test/testcases/span/math/itex2mml.html', # bc of tidy
60
- ]
60
+ 'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview
61
+ 'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview
62
+ ].compact
63
+ EXCLUDE_HTML_TEXT_FILES = ['test/testcases/block/09_html/parse_as_span.htmlinput',
64
+ 'test/testcases/block/09_html/parse_as_raw.htmlinput',
65
+ ].compact
61
66
  Dir[File.dirname(__FILE__) + '/testcases/**/*.{html,html.19,htmlinput,htmlinput.19}'].each do |html_file|
62
67
  next if EXCLUDE_HTML_FILES.any? {|f| html_file =~ /#{f}(\.19)?$/}
63
68
  next if (RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')) ||
64
69
  (RUBY_VERSION < '1.9' && html_file =~ /\.19$/)
65
- out_file = (html_file =~ /\.htmlinput(\.19)?$/ ? html_file.sub(/input(\.19)?$/, '') : html_file)
66
- define_method('test_' + html_file.tr('.', '_') + "_to_html") do
67
- opts_file = html_file.sub(/\.html(input)?(\.19)?$/, '.options')
68
- opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file)
69
- options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1}
70
- doc = Kramdown::Document.new(File.read(html_file), options.merge(:input => 'html'))
71
- assert_equal(tidy_output(File.read(out_file)), tidy_output(doc.to_html))
70
+
71
+ out_files = []
72
+ out_files << [(html_file =~ /\.htmlinput(\.19)?$/ ? html_file.sub(/input(\.19)?$/, '') : html_file), :to_html]
73
+ if html_file =~ /\.htmlinput(\.19)?$/ && !EXCLUDE_HTML_TEXT_FILES.any? {|f| html_file =~ /#{f}/}
74
+ out_files << [html_file.sub(/htmlinput(\.19)?$/, 'text'), :to_kramdown]
75
+ end
76
+ out_files.select {|f, _| File.exist?(f)}.each do |out_file, out_method|
77
+ define_method('test_' + html_file.tr('.', '_') + "_to_#{File.extname(out_file)}") do
78
+ opts_file = html_file.sub(/\.html(input)?(\.19)?$/, '.options')
79
+ opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file)
80
+ options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1}
81
+ doc = Kramdown::Document.new(File.read(html_file), options.merge(:input => 'html'))
82
+ if out_method == :to_html
83
+ assert_equal(tidy_output(File.read(out_file)), tidy_output(doc.send(out_method)))
84
+ else
85
+ assert_equal(File.read(out_file), doc.send(out_method))
86
+ end
87
+ end
72
88
  end
73
89
  end
74
90
  end
@@ -93,8 +109,9 @@ class TestFiles < Minitest::Test
93
109
  else
94
110
  EXCLUDE_LATEX_FILES = ['test/testcases/span/01_link/image_in_a.text', # bc of image link
95
111
  'test/testcases/span/01_link/imagelinks.text', # bc of image links
112
+ 'test/testcases/span/01_link/empty_title.text',
96
113
  'test/testcases/span/04_footnote/markers.text', # bc of footnote in header
97
- ]
114
+ ].compact
98
115
  Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
99
116
  next if EXCLUDE_LATEX_FILES.any? {|f| text_file =~ /#{f}$/}
100
117
  define_method('test_' + text_file.tr('.', '_') + "_to_latex_compilation") do
@@ -137,12 +154,14 @@ class TestFiles < Minitest::Test
137
154
  'test/testcases/span/math/ritex.text', # bc of tidy
138
155
  'test/testcases/block/15_math/itex2mml.text', # bc of tidy
139
156
  'test/testcases/span/math/itex2mml.text', # bc of tidy
157
+ 'test/testcases/span/01_link/link_defs_with_ial.text', # bc of attribute ordering
140
158
  ].compact
141
159
  Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
142
160
  next if EXCLUDE_TEXT_FILES.any? {|f| text_file =~ /#{f}$/}
161
+ html_file = text_file.sub(/\.text$/, '.html')
162
+ html_file += '.19' if RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')
163
+ next unless File.exist?(html_file)
143
164
  define_method('test_' + text_file.tr('.', '_') + "_to_kramdown_to_html") do
144
- html_file = text_file.sub(/\.text$/, '.html')
145
- html_file += '.19' if RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')
146
165
  opts_file = text_file.sub(/\.text$/, '.options')
147
166
  opts_file = File.join(File.dirname(text_file), 'options') if !File.exist?(opts_file)
148
167
  options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1}
@@ -177,7 +196,10 @@ class TestFiles < Minitest::Test
177
196
  'test/testcases/span/math/ritex.html', # bc of tidy
178
197
  'test/testcases/block/15_math/itex2mml.html', # bc of tidy
179
198
  'test/testcases/span/math/itex2mml.html', # bc of tidy
180
- ]
199
+ 'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview
200
+ 'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview
201
+ 'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute ordering
202
+ ].compact
181
203
  Dir[File.dirname(__FILE__) + '/testcases/**/*.{html,html.19}'].each do |html_file|
182
204
  next if EXCLUDE_HTML_KD_FILES.any? {|f| html_file =~ /#{f}(\.19)?$/}
183
205
  next if (RUBY_VERSION >= '1.9' && File.exist?(html_file + '.19')) ||
@@ -251,7 +273,7 @@ class TestFiles < Minitest::Test
251
273
  'test/testcases/span/text_substitutions/typography.text',
252
274
  ('test/testcases/span/03_codespan/highlighting-rouge.text' if RUBY_VERSION < '2.0'),
253
275
  ('test/testcases/block/06_codeblock/highlighting-rouge.text' if RUBY_VERSION < '2.0'), #bc of rouge
254
- ]
276
+ ].compact
255
277
 
256
278
  # Generate test methods for gfm-to-html conversion
257
279
  Dir[File.dirname(__FILE__) + '/{testcases,testcases_gfm}/**/*.text'].each do |text_file|
@@ -261,6 +283,7 @@ class TestFiles < Minitest::Test
261
283
  html_file = [(".html.19" if RUBY_VERSION >= '1.9'), ".html"].compact.
262
284
  map {|ext| basename + ext }.
263
285
  detect {|file| File.exist?(file) }
286
+ next unless html_file
264
287
 
265
288
  define_method('test_gfm_' + text_file.tr('.', '_') + "_to_html") do
266
289
  opts_file = basename + '.options'
@@ -272,12 +295,20 @@ class TestFiles < Minitest::Test
272
295
  end
273
296
 
274
297
 
298
+ EXCLUDE_PDF_MODIFY = ['test/testcases/span/text_substitutions/entities.text',
299
+ 'test/testcases/span/text_substitutions/entities_numeric.text',
300
+ 'test/testcases/span/text_substitutions/entities_as_char.text',
301
+ 'test/testcases/span/text_substitutions/entities_as_input.text',
302
+ 'test/testcases/span/text_substitutions/entities_symbolic.text',
303
+ 'test/testcases/block/04_header/with_auto_ids.text',
304
+ ].compact
305
+
275
306
  # Generate test methods for asserting that converters don't modify the document tree.
276
307
  Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
277
308
  opts_file = text_file.sub(/\.text$/, '.options')
278
309
  options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {:auto_ids => false, :footnote_nr => 1}
279
310
  (Kramdown::Converter.constants.map {|c| c.to_sym} - [:Base, :RemoveHtmlTags, :MathEngine, :SyntaxHighlighter]).each do |conv_class|
280
- next if conv_class == :Pdf && RUBY_VERSION < '1.9'
311
+ next if conv_class == :Pdf && (RUBY_VERSION < '2.0' || EXCLUDE_PDF_MODIFY.any? {|f| text_file =~ /#{f}$/})
281
312
  define_method("test_whether_#{conv_class}_modifies_tree_with_file_#{text_file.tr('.', '_')}") do
282
313
  doc = Kramdown::Document.new(File.read(text_file), options)
283
314
  options_before = Marshal.load(Marshal.dump(doc.options))
@@ -1,4 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ #--
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
+ #
6
+ # This file is part of kramdown which is licensed under the MIT.
7
+ #++
8
+ #
9
+
2
10
 
3
11
  require 'minitest/autorun'
4
12
  require 'kramdown'
@@ -1,4 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ #--
4
+ # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
+ #
6
+ # This file is part of kramdown which is licensed under the MIT.
7
+ #++
8
+ #
9
+
2
10
 
3
11
  require 'minitest/autorun'
4
12
  require 'kramdown/utils/string_scanner'
@@ -30,7 +30,7 @@
30
30
 
31
31
  <h1>header</h1>
32
32
 
33
- <p># </p>
33
+ <p>#</p>
34
34
 
35
35
  <p>#</p>
36
36
 
@@ -1,6 +1,6 @@
1
- <div class="highlighter-rouge"><pre><code class="highlight"><span class="n">x</span> <span class="o">=</span> <span class="no">Class</span><span class="p">.</span><span class="nf">new</span>
1
+ <div class="highlighter-rouge"><pre class="highlight"><code><span class="n">x</span> <span class="o">=</span> <span class="no">Class</span><span class="p">.</span><span class="nf">new</span>
2
2
  </code></pre>
3
3
  </div>
4
- <div class="highlighter-rouge"><pre><code class="highlight"><span class="nt">&lt;a&gt;</span>href<span class="nt">&lt;/a&gt;</span>
4
+ <div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;a&gt;</span>href<span class="nt">&lt;/a&gt;</span>
5
5
  </code></pre>
6
6
  </div>
@@ -0,0 +1,7 @@
1
+ <p>Para</p>
2
+ <div class="test">division</div>
3
+
4
+ <blockquote>
5
+ <p>Quote</p>
6
+ </blockquote>
7
+ <div class="test">division</div>
@@ -0,0 +1,5 @@
1
+ Para
2
+ <div class="test">division</div>
3
+
4
+ > Quote
5
+ <div class="test">division</div>
@@ -1,4 +1,4 @@
1
- <p key1="val&quot;" key2="val'" class="other-class myclass class" id="other" key="val">Some paragraph.</p>
1
+ <p key1="val&quot;" key2="val'" class="other-class myclass class -class" id="other" key="val">Some paragraph.</p>
2
2
 
3
3
  <p class="cls1 cls2" id="id">Some paragraph.</p>
4
4
 
@@ -20,6 +20,8 @@
20
20
 
21
21
  <p class="cls">Some paragraph here</p>
22
22
 
23
+ <p class="cls1 cls2">Some paragraph here</p>
24
+
23
25
  <p class="cls">Paragraph</p>
24
26
  <p>Paragraph</p>
25
27
 
@@ -1,5 +1,5 @@
1
1
  Some paragraph.
2
- {:.class id key="val"}
2
+ {:.class .-class id key="val"}
3
3
 
4
4
  Some paragraph.
5
5
  {:.cls1#id.cls2}
@@ -22,6 +22,10 @@ Some paragraph.
22
22
  {:.cls}
23
23
  Some paragraph here
24
24
 
25
+ {:.cls1}
26
+ {:.cls2}
27
+ Some paragraph here
28
+
25
29
  Paragraph
26
30
  {:.cls}
27
31
  Paragraph
@@ -1,2 +1,2 @@
1
1
  <script type="math/tex; mode=display">% <![CDATA[
2
- alert('a') alert('b<') %]]></script>
2
+ alert('a') alert('b<') %]]></script>
@@ -0,0 +1,4 @@
1
+ <p>This is a <span class="MathJax_Preview">5 + 5</span><script type="math/tex">5 + 5</script> statement</p>
2
+
3
+ <div class="MathJax_Preview">5 + 5</div>
4
+ <script type="math/tex; mode=display">5 + 5</script>
@@ -0,0 +1,2 @@
1
+ :math_engine_opts:
2
+ :preview: true
@@ -0,0 +1,5 @@
1
+ This is a $$5 + 5$$ statement
2
+
3
+ $$
4
+ 5 + 5
5
+ $$
@@ -0,0 +1,4 @@
1
+ <p>This is a <span class="MathJax_Preview">math</span><script type="math/tex">5 + 5</script> statement</p>
2
+
3
+ <div class="MathJax_Preview">math</div>
4
+ <script type="math/tex; mode=display">5 + 5</script>
@@ -0,0 +1,2 @@
1
+ :math_engine_opts:
2
+ :preview: 'math'
@@ -0,0 +1,5 @@
1
+ This is a $$5 + 5$$ statement
2
+
3
+ $$
4
+ 5 + 5
5
+ $$
@@ -1,5 +1,5 @@
1
1
  <p>This is a para.
2
- <script type="math/tex"> \text{LaTeX} \lambda_5 </script></p>
2
+ <script type="math/tex">\text{LaTeX} \lambda_5</script></p>
3
3
 
4
4
  <script type="math/tex; mode=display">\lambda_5 = \alpha + 4</script>
5
5
 
@@ -1,19 +1,19 @@
1
1
  <h1 class="no_toc" id="contents">Contents</h1>
2
2
 
3
3
  <ul id="markdown-toc">
4
- <li><a href="#header-level-1">Header level 1</a> <ul>
5
- <li><a href="#header-level-2">Header level 2</a> <ul>
6
- <li><a href="#header-level-3">Header level 3</a> <ul>
7
- <li><a href="#header-level-4">Header level 4</a></li>
4
+ <li><a href="#header-level-1" id="markdown-toc-header-level-1">Header level 1</a> <ul>
5
+ <li><a href="#header-level-2" id="markdown-toc-header-level-2">Header level 2</a> <ul>
6
+ <li><a href="#header-level-3" id="markdown-toc-header-level-3">Header level 3</a> <ul>
7
+ <li><a href="#header-level-4" id="markdown-toc-header-level-4">Header level 4</a></li>
8
8
  </ul>
9
9
  </li>
10
10
  </ul>
11
11
  </li>
12
12
  </ul>
13
13
  </li>
14
- <li><a href="#other-header-level-1">Other header level 1</a> <ul>
15
- <li><a href="#other-header-level-2">Other header level 2</a> <ul>
16
- <li><a href="#other-header-level-3">Other header level 3</a></li>
14
+ <li><a href="#other-header-level-1" id="markdown-toc-other-header-level-1">Other header level 1</a> <ul>
15
+ <li><a href="#other-header-level-2" id="markdown-toc-other-header-level-2">Other header level 2</a> <ul>
16
+ <li><a href="#other-header-level-3" id="markdown-toc-other-header-level-3">Other header level 3</a></li>
17
17
  </ul>
18
18
  </li>
19
19
  </ul>