asciidoctor 1.5.3 → 1.5.4

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

Potentially problematic release.


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

Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +67 -5
  3. data/CONTRIBUTING.adoc +171 -0
  4. data/LICENSE.adoc +1 -1
  5. data/README.adoc +62 -30
  6. data/bin/asciidoctor +3 -3
  7. data/bin/asciidoctor-safe +8 -5
  8. data/lib/asciidoctor.rb +10 -21
  9. data/lib/asciidoctor/abstract_block.rb +29 -11
  10. data/lib/asciidoctor/abstract_node.rb +11 -6
  11. data/lib/asciidoctor/callouts.rb +6 -10
  12. data/lib/asciidoctor/cli/options.rb +2 -2
  13. data/lib/asciidoctor/converter.rb +1 -1
  14. data/lib/asciidoctor/converter/docbook5.rb +46 -23
  15. data/lib/asciidoctor/converter/factory.rb +3 -3
  16. data/lib/asciidoctor/converter/html5.rb +27 -24
  17. data/lib/asciidoctor/converter/manpage.rb +72 -61
  18. data/lib/asciidoctor/converter/template.rb +5 -9
  19. data/lib/asciidoctor/document.rb +18 -18
  20. data/lib/asciidoctor/extensions.rb +5 -5
  21. data/lib/asciidoctor/helpers.rb +2 -2
  22. data/lib/asciidoctor/inline.rb +2 -2
  23. data/lib/asciidoctor/parser.rb +59 -59
  24. data/lib/asciidoctor/path_resolver.rb +23 -15
  25. data/lib/asciidoctor/reader.rb +34 -29
  26. data/lib/asciidoctor/section.rb +6 -8
  27. data/lib/asciidoctor/substitutors.rb +2 -2
  28. data/lib/asciidoctor/table.rb +46 -23
  29. data/lib/asciidoctor/version.rb +1 -1
  30. data/man/asciidoctor.1 +11 -11
  31. data/man/asciidoctor.adoc +2 -2
  32. data/test/attributes_test.rb +21 -37
  33. data/test/blocks_test.rb +41 -14
  34. data/test/converter_test.rb +4 -4
  35. data/test/document_test.rb +61 -8
  36. data/test/extensions_test.rb +2 -2
  37. data/test/invoker_test.rb +3 -3
  38. data/test/links_test.rb +13 -3
  39. data/test/lists_test.rb +114 -114
  40. data/test/manpage_test.rb +203 -0
  41. data/test/paragraphs_test.rb +3 -3
  42. data/test/parser_test.rb +4 -4
  43. data/test/preamble_test.rb +1 -1
  44. data/test/reader_test.rb +149 -109
  45. data/test/sections_test.rb +137 -27
  46. data/test/substitutions_test.rb +24 -16
  47. data/test/tables_test.rb +183 -31
  48. data/test/test_helper.rb +10 -22
  49. metadata +9 -6
  50. data/compat/asciidoc.conf +0 -395
  51. data/compat/font-awesome-3-compat.css +0 -397
@@ -276,7 +276,7 @@ context 'Extensions' do
276
276
  ensure
277
277
  Asciidoctor::Extensions.unregister_all
278
278
  end
279
-
279
+
280
280
  end
281
281
  end
282
282
 
@@ -444,7 +444,7 @@ after
444
444
  Asciidoctor::Extensions.unregister_all
445
445
  end
446
446
  end
447
-
447
+
448
448
  test 'should call include processor to process include directive' do
449
449
  input = <<-EOS
450
450
  first line
@@ -194,7 +194,7 @@ context 'Invoker' do
194
194
  destination_path = File.expand_path(File.join(File.dirname(__FILE__), 'test_output'))
195
195
  sample_outpath = File.join(destination_path, 'sample.html')
196
196
  begin
197
- FileUtils.mkdir_p(destination_path)
197
+ FileUtils.mkdir_p(destination_path)
198
198
  # QUESTION should -D be relative to working directory or source directory?
199
199
  invoker = invoke_cli %w(-D test/test_output)
200
200
  #invoker = invoke_cli %w(-D ../../test/test_output)
@@ -481,7 +481,7 @@ context 'Invoker' do
481
481
  test 'default mode for cli should be unsafe' do
482
482
  invoker = invoke_cli_to_buffer %w(-o /dev/null)
483
483
  doc = invoker.document
484
- assert_equal Asciidoctor::SafeMode::UNSAFE, doc.safe
484
+ assert_equal Asciidoctor::SafeMode::UNSAFE, doc.safe
485
485
  end
486
486
 
487
487
  test 'should set safe mode if specified' do
@@ -529,7 +529,7 @@ context 'Invoker' do
529
529
  assert !stdout_lines.empty?
530
530
  stdout_lines.each {|l| l.force_encoding Encoding::UTF_8 } if Asciidoctor::FORCE_ENCODING
531
531
  stdout_str = stdout_lines.join
532
- assert stdout_str.include?('Codierungen sind verrückt auf älteren Versionen von Ruby')
532
+ assert stdout_str.include?('Codierungen sind verrückt auf älteren Versionen von Ruby')
533
533
  ensure
534
534
  ENV['LANG'] = old_lang
535
535
  end
@@ -38,6 +38,16 @@ context 'Links' do
38
38
  assert_xpath %{//a[@href='http://asciidoc.org'][text() = 'AsciiDoc\nmarkup']}, render_string("We're parsing link:http://asciidoc.org[AsciiDoc\nmarkup]")
39
39
  end
40
40
 
41
+ test 'qualified url with label containing square brackets using link macro' do
42
+ str = 'http://example.com[[bracket1\]]'
43
+ doc = document_from_string str, :header_footer => false, :doctype => 'inline'
44
+ assert_match '<a href="http://example.com">[bracket1]</a>', doc.convert, 1
45
+ doc = document_from_string str, :header_footer => false, :backend => 'docbook', :doctype => 'inline'
46
+ assert_match '<link xl:href="http://example.com">[bracket1]</link>', doc.convert, 1
47
+ doc = document_from_string str, :header_footer => false, :backend => 'docbook45', :doctype => 'inline'
48
+ assert_match '<ulink url="http://example.com">[bracket1]</ulink>', doc.convert, 1
49
+ end
50
+
41
51
  test 'qualified url surrounded by angled brackets' do
42
52
  assert_xpath '//a[@href="http://asciidoc.org"][text()="http://asciidoc.org"]', render_string('<http://asciidoc.org> is the project page for AsciiDoc.'), 1
43
53
  end
@@ -75,7 +85,7 @@ context 'Links' do
75
85
  end
76
86
 
77
87
  test 'qualified url following smart apostrophe' do
78
- output = render_embedded_string("l&#8217;http://www.irit.fr[IRIT]")
88
+ output = render_embedded_string("l&#8217;http://www.irit.fr[IRIT]")
79
89
  assert_match(/l&#8217;<a href=/, output)
80
90
  end
81
91
 
@@ -204,7 +214,7 @@ context 'Links' do
204
214
 
205
215
  test 'xref using angled bracket syntax with path sans extension using docbook backend' do
206
216
  doc = document_from_string '<<tigers#>>', :header_footer => false, :backend => 'docbook'
207
- assert_match '<link xlink:href="tigers.xml">tigers.xml</link>', doc.render, 1
217
+ assert_match '<link xl:href="tigers.xml">tigers.xml</link>', doc.render, 1
208
218
  doc = document_from_string '<<tigers#>>', :header_footer => false, :backend => 'docbook45'
209
219
  assert_match '<ulink url="tigers.xml">tigers.xml</ulink>', doc.render, 1
210
220
  end
@@ -307,7 +317,7 @@ context 'Links' do
307
317
 
308
318
  <\<_section_a>>
309
319
  EOS
310
-
320
+
311
321
  output = render_embedded_string input
312
322
  assert_xpath '//h2[@id="_section_a"][text()="Section A"]', output, 1
313
323
  assert_xpath '//a[@href="#_section_a"][text()="Section A"]', output, 1
@@ -352,7 +352,7 @@ paragraph in list item 1
352
352
 
353
353
  - list item 2
354
354
  EOS
355
- output = render_embedded_string input
355
+ output = render_embedded_string input
356
356
  assert_css 'ul', output, 1
357
357
  assert_css 'ul li', output, 2
358
358
  assert_xpath '(//ul/li)[1]/p[text()="list item 1"]', output, 1
@@ -1079,7 +1079,7 @@ Lists
1079
1079
  ----
1080
1080
  5.times { print "Odelay!" }
1081
1081
  ----
1082
-
1082
+
1083
1083
  * Item two
1084
1084
  EOS
1085
1085
  output = render_string input
@@ -1099,7 +1099,7 @@ Lists
1099
1099
  * Item one, paragraph one
1100
1100
  +
1101
1101
  [source]
1102
-
1102
+
1103
1103
  * Item two
1104
1104
  EOS
1105
1105
  output = render_string input
@@ -1117,7 +1117,7 @@ Lists
1117
1117
  * Item one, paragraph one
1118
1118
  +
1119
1119
  .Disappears into the ether
1120
-
1120
+
1121
1121
  * Item two
1122
1122
  EOS
1123
1123
  output = render_string input
@@ -1218,7 +1218,7 @@ paragraph for list item 1
1218
1218
 
1219
1219
  . list item 2
1220
1220
  EOS
1221
- output = render_embedded_string input
1221
+ output = render_embedded_string input
1222
1222
  assert_css '.olist ol', output, 1
1223
1223
  assert_css '.olist ol > li', output, 2
1224
1224
  assert_css '.ulist ul', output, 1
@@ -1251,7 +1251,7 @@ bullet 1 paragraph
1251
1251
 
1252
1252
  * bullet 2
1253
1253
  EOS
1254
- output = render_embedded_string input
1254
+ output = render_embedded_string input
1255
1255
 
1256
1256
  assert_xpath '(//ul)[1]/li', output, 2
1257
1257
 
@@ -1292,7 +1292,7 @@ paragraph for list item 1
1292
1292
 
1293
1293
  . list item 2
1294
1294
  EOS
1295
- output = render_embedded_string input
1295
+ output = render_embedded_string input
1296
1296
  assert_css '.olist ol', output, 1
1297
1297
  assert_css '.olist ol > li', output, 2
1298
1298
  assert_css '.ulist ul', output, 1
@@ -1333,7 +1333,7 @@ paragraph for list item 1
1333
1333
 
1334
1334
  . list item 2
1335
1335
  EOS
1336
- output = render_embedded_string input
1336
+ output = render_embedded_string input
1337
1337
  assert_css '.olist ol', output, 1
1338
1338
  assert_css '.olist ol > li', output, 2
1339
1339
  assert_css '.ulist ul', output, 1
@@ -1375,7 +1375,7 @@ paragraph for list item 1
1375
1375
 
1376
1376
  . list item 2
1377
1377
  EOS
1378
- output = render_embedded_string input
1378
+ output = render_embedded_string input
1379
1379
  assert_css '.olist ol', output, 1
1380
1380
  assert_css '.olist ol > li', output, 2
1381
1381
  assert_css '.ulist ul', output, 1
@@ -1417,7 +1417,7 @@ bullet 1 paragraph
1417
1417
 
1418
1418
  * bullet 2
1419
1419
  EOS
1420
- output = render_embedded_string input
1420
+ output = render_embedded_string input
1421
1421
 
1422
1422
  assert_xpath '((//ul)[1]/li[1])/*', output, 3
1423
1423
  assert_xpath '(((//ul)[1]/li[1])/*)[1]/self::p[text()="bullet 1"]', output, 1
@@ -1577,7 +1577,7 @@ List
1577
1577
  . Refactor!
1578
1578
  EOS
1579
1579
 
1580
- output = render_embedded_string input
1580
+ output = render_embedded_string input
1581
1581
  assert_css '.olist.arabic.dry', output, 1
1582
1582
  assert_css '.olist ol.arabic', output, 1
1583
1583
  end
@@ -1590,7 +1590,7 @@ List
1590
1590
  . Refactor!
1591
1591
  EOS
1592
1592
 
1593
- output = render_embedded_string input
1593
+ output = render_embedded_string input
1594
1594
  assert_css '.olist.loweralpha.dry', output, 1
1595
1595
  assert_css '.olist ol.loweralpha', output, 1
1596
1596
  end
@@ -1603,7 +1603,7 @@ List
1603
1603
  . Refactor!
1604
1604
  EOS
1605
1605
 
1606
- output = render_embedded_string input
1606
+ output = render_embedded_string input
1607
1607
  assert_css '.olist.arabic.dry', output, 1
1608
1608
  assert_css '.olist ol.arabic', output, 1
1609
1609
  end
@@ -1616,7 +1616,7 @@ List
1616
1616
  . Refactor!
1617
1617
  EOS
1618
1618
 
1619
- output = render_embedded_string input
1619
+ output = render_embedded_string input
1620
1620
  assert_css '.olist.loweralpha.dry', output, 1
1621
1621
  assert_css '.olist ol.loweralpha', output, 1
1622
1622
  end
@@ -2598,7 +2598,7 @@ definition
2598
2598
 
2599
2599
  last::
2600
2600
  EOS
2601
- output = render_embedded_string input
2601
+ output = render_embedded_string input
2602
2602
  assert_xpath '//tr', output, 2
2603
2603
  assert_xpath '(//tr)[1]/td[@class="hdlist1"]', output, 1
2604
2604
  # NOTE I'm trimming the trailing <br> in Asciidoctor
@@ -2616,7 +2616,7 @@ definition
2616
2616
 
2617
2617
  last::
2618
2618
  EOS
2619
- output = render_embedded_string input, :backend => 'docbook'
2619
+ output = render_embedded_string input, :backend => 'docbook'
2620
2620
  assert_xpath '//row', output, 2
2621
2621
  assert_xpath '(//row)[1]/entry', output, 2
2622
2622
  assert_xpath '((//row)[1]/entry)[1]/simpara', output, 2
@@ -2762,13 +2762,13 @@ context 'Description lists redux' do
2762
2762
  term1::
2763
2763
  def1
2764
2764
  EOS
2765
-
2765
+
2766
2766
  output = render_embedded_string input
2767
2767
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2768
2768
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2769
2769
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2770
2770
  end
2771
-
2771
+
2772
2772
  test 'folds text from first line after blank lines' do
2773
2773
  input = <<-EOS
2774
2774
  == Lists
@@ -2778,13 +2778,13 @@ term1::
2778
2778
 
2779
2779
  def1
2780
2780
  EOS
2781
-
2781
+
2782
2782
  output = render_embedded_string input
2783
2783
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2784
2784
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2785
2785
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2786
2786
  end
2787
-
2787
+
2788
2788
  test 'folds text from first line after blank line and immediately preceding next item' do
2789
2789
  input = <<-EOS
2790
2790
  == Lists
@@ -2794,7 +2794,7 @@ term1::
2794
2794
  def1
2795
2795
  term2:: def2
2796
2796
  EOS
2797
-
2797
+
2798
2798
  output = render_embedded_string input
2799
2799
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2800
2800
  assert_xpath '//*[@class="dlist"]//dd', output, 2
@@ -2811,14 +2811,14 @@ def1
2811
2811
 
2812
2812
  term2:: def2
2813
2813
  EOS
2814
-
2814
+
2815
2815
  output = render_embedded_string input
2816
2816
  assert_css 'dl', output, 1
2817
2817
  assert_css 'dl > dt', output, 2
2818
2818
  assert_css 'dl > dd', output, 2
2819
2819
  assert_xpath '(//dl/dd)[1]/p[text()="def1"]', output, 1
2820
2820
  end
2821
-
2821
+
2822
2822
  test 'folds text from first line after comment line' do
2823
2823
  input = <<-EOS
2824
2824
  == Lists
@@ -2827,13 +2827,13 @@ term1::
2827
2827
  // comment
2828
2828
  def1
2829
2829
  EOS
2830
-
2830
+
2831
2831
  output = render_embedded_string input
2832
2832
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2833
2833
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2834
2834
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2835
2835
  end
2836
-
2836
+
2837
2837
  test 'folds text from line following comment line offset by blank line' do
2838
2838
  input = <<-EOS
2839
2839
  == Lists
@@ -2843,13 +2843,13 @@ term1::
2843
2843
  // comment
2844
2844
  def1
2845
2845
  EOS
2846
-
2846
+
2847
2847
  output = render_embedded_string input
2848
2848
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2849
2849
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2850
2850
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2851
2851
  end
2852
-
2852
+
2853
2853
  test 'folds text from subsequent indented line' do
2854
2854
  input = <<-EOS
2855
2855
  == Lists
@@ -2857,13 +2857,13 @@ def1
2857
2857
  term1::
2858
2858
  def1
2859
2859
  EOS
2860
-
2860
+
2861
2861
  output = render_embedded_string input
2862
2862
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2863
2863
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2864
2864
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2865
2865
  end
2866
-
2866
+
2867
2867
  test 'folds text from indented line after blank line' do
2868
2868
  input = <<-EOS
2869
2869
  == Lists
@@ -2872,13 +2872,13 @@ term1::
2872
2872
 
2873
2873
  def1
2874
2874
  EOS
2875
-
2875
+
2876
2876
  output = render_embedded_string input
2877
2877
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2878
2878
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2879
2879
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
2880
2880
  end
2881
-
2881
+
2882
2882
  test 'folds text that looks like ruler offset by blank line' do
2883
2883
  input = <<-EOS
2884
2884
  == Lists
@@ -2887,13 +2887,13 @@ term1::
2887
2887
 
2888
2888
  '''
2889
2889
  EOS
2890
-
2890
+
2891
2891
  output = render_embedded_string input
2892
2892
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2893
2893
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2894
2894
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="'''"]), output, 1
2895
2895
  end
2896
-
2896
+
2897
2897
  test 'folds text that looks like ruler offset by blank line and line comment' do
2898
2898
  input = <<-EOS
2899
2899
  == Lists
@@ -2903,13 +2903,13 @@ term1::
2903
2903
  // comment
2904
2904
  '''
2905
2905
  EOS
2906
-
2906
+
2907
2907
  output = render_embedded_string input
2908
2908
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2909
2909
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2910
2910
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="'''"]), output, 1
2911
2911
  end
2912
-
2912
+
2913
2913
  test 'folds text that looks like ruler and the line following it offset by blank line' do
2914
2914
  input = <<-EOS
2915
2915
  == Lists
@@ -2919,13 +2919,13 @@ term1::
2919
2919
  '''
2920
2920
  continued
2921
2921
  EOS
2922
-
2922
+
2923
2923
  output = render_embedded_string input
2924
2924
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2925
2925
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2926
2926
  assert_xpath %(//*[@class="dlist"]//dd/p[normalize-space(text())="''' continued"]), output, 1
2927
2927
  end
2928
-
2928
+
2929
2929
  test 'folds text that looks like title offset by blank line' do
2930
2930
  input = <<-EOS
2931
2931
  == Lists
@@ -2934,13 +2934,13 @@ term1::
2934
2934
 
2935
2935
  .def1
2936
2936
  EOS
2937
-
2937
+
2938
2938
  output = render_embedded_string input
2939
2939
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2940
2940
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2941
2941
  assert_xpath '//*[@class="dlist"]//dd/p[text()=".def1"]', output, 1
2942
2942
  end
2943
-
2943
+
2944
2944
  test 'folds text that looks like title offset by blank line and line comment' do
2945
2945
  input = <<-EOS
2946
2946
  == Lists
@@ -2950,13 +2950,13 @@ term1::
2950
2950
  // comment
2951
2951
  .def1
2952
2952
  EOS
2953
-
2953
+
2954
2954
  output = render_embedded_string input
2955
2955
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2956
2956
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2957
2957
  assert_xpath '//*[@class="dlist"]//dd/p[text()=".def1"]', output, 1
2958
2958
  end
2959
-
2959
+
2960
2960
  test 'folds text that looks like admonition offset by blank line' do
2961
2961
  input = <<-EOS
2962
2962
  == Lists
@@ -2965,7 +2965,7 @@ term1::
2965
2965
 
2966
2966
  NOTE: def1
2967
2967
  EOS
2968
-
2968
+
2969
2969
  output = render_embedded_string input
2970
2970
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2971
2971
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -2980,14 +2980,14 @@ term1::
2980
2980
 
2981
2981
  == Another Section
2982
2982
  EOS
2983
-
2983
+
2984
2984
  output = render_embedded_string input
2985
2985
  assert_xpath '//*[@class="dlist"]/dl', output, 1
2986
2986
  assert_xpath '//*[@class="dlist"]//dd', output, 1
2987
2987
  assert_xpath '//*[@class="dlist"]//dd/p[text()="== Another Section"]', output, 1
2988
2988
  assert_xpath '//h2', output, 1
2989
2989
  end
2990
-
2990
+
2991
2991
  test 'folds text of first literal line offset by blank line appends subsequent literals offset by blank line as blocks' do
2992
2992
  input = <<-EOS
2993
2993
  == Lists
@@ -3001,7 +3001,7 @@ term1::
3001
3001
 
3002
3002
  literal
3003
3003
  EOS
3004
-
3004
+
3005
3005
  output = render_embedded_string input
3006
3006
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3007
3007
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3009,7 +3009,7 @@ term1::
3009
3009
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="literalblock"]', output, 2
3010
3010
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 2
3011
3011
  end
3012
-
3012
+
3013
3013
  test 'folds text of subsequent line and appends following literal line offset by blank line as block if term has no inline definition' do
3014
3014
  input = <<-EOS
3015
3015
  == Lists
@@ -3021,7 +3021,7 @@ def1
3021
3021
 
3022
3022
  term2:: def2
3023
3023
  EOS
3024
-
3024
+
3025
3025
  output = render_embedded_string input
3026
3026
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3027
3027
  assert_xpath '//*[@class="dlist"]//dd', output, 2
@@ -3029,7 +3029,7 @@ term2:: def2
3029
3029
  assert_xpath '(//*[@class="dlist"]//dd)[1]/p/following-sibling::*[@class="literalblock"]', output, 1
3030
3030
  assert_xpath '(//*[@class="dlist"]//dd)[1]/p/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 1
3031
3031
  end
3032
-
3032
+
3033
3033
  test 'appends literal line attached by continuation as block if item has no inline definition' do
3034
3034
  input = <<-EOS
3035
3035
  == Lists
@@ -3038,7 +3038,7 @@ term1::
3038
3038
  +
3039
3039
  literal
3040
3040
  EOS
3041
-
3041
+
3042
3042
  output = render_embedded_string input
3043
3043
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3044
3044
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3046,7 +3046,7 @@ term1::
3046
3046
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]', output, 1
3047
3047
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]//pre[text()="literal"]', output, 1
3048
3048
  end
3049
-
3049
+
3050
3050
  test 'appends literal line attached by continuation as block if item has no inline definition followed by ruler' do
3051
3051
  input = <<-EOS
3052
3052
  == Lists
@@ -3057,7 +3057,7 @@ term1::
3057
3057
 
3058
3058
  '''
3059
3059
  EOS
3060
-
3060
+
3061
3061
  output = render_embedded_string input
3062
3062
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3063
3063
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3066,7 +3066,7 @@ term1::
3066
3066
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]//pre[text()="literal"]', output, 1
3067
3067
  assert_xpath '//*[@class="dlist"]/following-sibling::hr', output, 1
3068
3068
  end
3069
-
3069
+
3070
3070
  test 'appends line attached by continuation as block if item has no inline definition followed by ruler' do
3071
3071
  input = <<-EOS
3072
3072
  == Lists
@@ -3077,7 +3077,7 @@ para
3077
3077
 
3078
3078
  '''
3079
3079
  EOS
3080
-
3080
+
3081
3081
  output = render_embedded_string input
3082
3082
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3083
3083
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3086,7 +3086,7 @@ para
3086
3086
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]/p[text()="para"]', output, 1
3087
3087
  assert_xpath '//*[@class="dlist"]/following-sibling::hr', output, 1
3088
3088
  end
3089
-
3089
+
3090
3090
  test 'appends line attached by continuation as block if item has no inline definition followed by block' do
3091
3091
  input = <<-EOS
3092
3092
  == Lists
@@ -3099,7 +3099,7 @@ para
3099
3099
  literal
3100
3100
  ....
3101
3101
  EOS
3102
-
3102
+
3103
3103
  output = render_embedded_string input
3104
3104
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3105
3105
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3109,7 +3109,7 @@ literal
3109
3109
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="literalblock"]', output, 1
3110
3110
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 1
3111
3111
  end
3112
-
3112
+
3113
3113
  test 'appends block attached by continuation but not subsequent block not attached by continuation' do
3114
3114
  input = <<-EOS
3115
3115
  == Lists
@@ -3123,7 +3123,7 @@ literal
3123
3123
  detached
3124
3124
  ....
3125
3125
  EOS
3126
-
3126
+
3127
3127
  output = render_embedded_string input
3128
3128
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3129
3129
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3133,7 +3133,7 @@ detached
3133
3133
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="literalblock"]', output, 1
3134
3134
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="literalblock"]//pre[text()="detached"]', output, 1
3135
3135
  end
3136
-
3136
+
3137
3137
  test 'appends list if item has no inline definition' do
3138
3138
  input = <<-EOS
3139
3139
  == Lists
@@ -3144,14 +3144,14 @@ term1::
3144
3144
  * two
3145
3145
  * three
3146
3146
  EOS
3147
-
3147
+
3148
3148
  output = render_embedded_string input
3149
3149
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3150
3150
  assert_xpath '//*[@class="dlist"]//dd', output, 1
3151
3151
  assert_xpath '//*[@class="dlist"]//dd/p', output, 0
3152
3152
  assert_xpath '//*[@class="dlist"]//dd//ul/li', output, 3
3153
3153
  end
3154
-
3154
+
3155
3155
  test 'appends list to first term when followed immediately by second term' do
3156
3156
  input = <<-EOS
3157
3157
  == Lists
@@ -3163,7 +3163,7 @@ term1::
3163
3163
  * three
3164
3164
  term2:: def2
3165
3165
  EOS
3166
-
3166
+
3167
3167
  output = render_embedded_string input
3168
3168
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3169
3169
  assert_xpath '//*[@class="dlist"]//dd', output, 2
@@ -3227,7 +3227,7 @@ paragraph
3227
3227
  assert_xpath '(//*[@class="dlist"]//dd)[1]/p/following-sibling::*[@class="ulist"]//li', output, 3
3228
3228
  assert_css '.dlist + .paragraph', output, 1
3229
3229
  end
3230
-
3230
+
3231
3231
  test 'appends list and paragraph block when line following list attached by continuation' do
3232
3232
  input = <<-EOS
3233
3233
  == Lists
@@ -3241,7 +3241,7 @@ term1::
3241
3241
  +
3242
3242
  para
3243
3243
  EOS
3244
-
3244
+
3245
3245
  output = render_embedded_string input
3246
3246
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3247
3247
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3251,7 +3251,7 @@ para
3251
3251
  assert_xpath '//*[@class="dlist"]//dd/*[@class="ulist"]/following-sibling::*[@class="paragraph"]', output, 1
3252
3252
  assert_xpath '//*[@class="dlist"]//dd/*[@class="ulist"]/following-sibling::*[@class="paragraph"]/p[text()="para"]', output, 1
3253
3253
  end
3254
-
3254
+
3255
3255
  test 'first continued line associated with nested list item and second continued line associated with term' do
3256
3256
  input = <<-EOS
3257
3257
  == Lists
@@ -3264,7 +3264,7 @@ nested list para
3264
3264
  +
3265
3265
  term1 para
3266
3266
  EOS
3267
-
3267
+
3268
3268
  output = render_embedded_string input
3269
3269
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3270
3270
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3275,7 +3275,7 @@ term1 para
3275
3275
  assert_xpath '//*[@class="dlist"]//dd/*[@class="ulist"]/following-sibling::*[@class="paragraph"]', output, 1
3276
3276
  assert_xpath '//*[@class="dlist"]//dd/*[@class="ulist"]/following-sibling::*[@class="paragraph"]/p[text()="term1 para"]', output, 1
3277
3277
  end
3278
-
3278
+
3279
3279
  test 'literal line attached by continuation swallows adjacent line that looks like term' do
3280
3280
  input = <<-EOS
3281
3281
  == Lists
@@ -3288,7 +3288,7 @@ notnestedterm:::
3288
3288
  literal
3289
3289
  notnestedterm:::
3290
3290
  EOS
3291
-
3291
+
3292
3292
  output = render_embedded_string input
3293
3293
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3294
3294
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3296,7 +3296,7 @@ notnestedterm:::
3296
3296
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]', output, 2
3297
3297
  assert_xpath %(//*[@class="dlist"]//dd/*[@class="literalblock"]//pre[text()=" literal\nnotnestedterm:::"]), output, 2
3298
3298
  end
3299
-
3299
+
3300
3300
  test 'line attached by continuation is appended as paragraph if term has no inline definition' do
3301
3301
  input = <<-EOS
3302
3302
  == Lists
@@ -3305,7 +3305,7 @@ term1::
3305
3305
  +
3306
3306
  para
3307
3307
  EOS
3308
-
3308
+
3309
3309
  output = render_embedded_string input
3310
3310
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3311
3311
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3362,7 +3362,7 @@ not a term::: def
3362
3362
  assert_css '.dlist > dl > dd > .quoteblock', output, 1
3363
3363
  assert output.include?('not a term::: def')
3364
3364
  end
3365
-
3365
+
3366
3366
  test 'appends line as paragraph if attached by continuation following blank line and line comment when term has no inline definition' do
3367
3367
  input = <<-EOS
3368
3368
  == Lists
@@ -3373,7 +3373,7 @@ term1::
3373
3373
  +
3374
3374
  para
3375
3375
  EOS
3376
-
3376
+
3377
3377
  output = render_embedded_string input
3378
3378
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3379
3379
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3381,7 +3381,7 @@ para
3381
3381
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]', output, 1
3382
3382
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]/p[text()="para"]', output, 1
3383
3383
  end
3384
-
3384
+
3385
3385
  test 'line attached by continuation offset by blank line is appended as paragraph if term has no inline definition' do
3386
3386
  input = <<-EOS
3387
3387
  == Lists
@@ -3391,7 +3391,7 @@ term1::
3391
3391
  +
3392
3392
  para
3393
3393
  EOS
3394
-
3394
+
3395
3395
  output = render_embedded_string input
3396
3396
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3397
3397
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3399,7 +3399,7 @@ para
3399
3399
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]', output, 1
3400
3400
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]/p[text()="para"]', output, 1
3401
3401
  end
3402
-
3402
+
3403
3403
  test 'delimited block breaks list even when term has no inline definition' do
3404
3404
  input = <<-EOS
3405
3405
  == Lists
@@ -3409,14 +3409,14 @@ term1::
3409
3409
  detached
3410
3410
  ====
3411
3411
  EOS
3412
-
3412
+
3413
3413
  output = render_embedded_string input
3414
3414
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3415
3415
  assert_xpath '//*[@class="dlist"]//dd', output, 0
3416
3416
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="exampleblock"]', output, 1
3417
3417
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="exampleblock"]//p[text()="detached"]', output, 1
3418
3418
  end
3419
-
3419
+
3420
3420
  test 'attribute line breaks list even when term has no inline definition' do
3421
3421
  input = <<-EOS
3422
3422
  == Lists
@@ -3425,14 +3425,14 @@ term1::
3425
3425
  [verse]
3426
3426
  detached
3427
3427
  EOS
3428
-
3428
+
3429
3429
  output = render_embedded_string input
3430
3430
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3431
3431
  assert_xpath '//*[@class="dlist"]//dd', output, 0
3432
3432
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="verseblock"]', output, 1
3433
3433
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="verseblock"]/pre[text()="detached"]', output, 1
3434
3434
  end
3435
-
3435
+
3436
3436
  test 'id line breaks list even when term has no inline definition' do
3437
3437
  input = <<-EOS
3438
3438
  == Lists
@@ -3441,7 +3441,7 @@ term1::
3441
3441
  [[id]]
3442
3442
  detached
3443
3443
  EOS
3444
-
3444
+
3445
3445
  output = render_embedded_string input
3446
3446
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3447
3447
  assert_xpath '//*[@class="dlist"]//dd', output, 0
@@ -3459,13 +3459,13 @@ detached
3459
3459
  term1:: def1
3460
3460
  continued
3461
3461
  EOS
3462
-
3462
+
3463
3463
  output = render_embedded_string input
3464
3464
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3465
3465
  assert_xpath '//*[@class="dlist"]//dd', output, 1
3466
3466
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="def1\ncontinued"]), output, 1
3467
3467
  end
3468
-
3468
+
3469
3469
  test 'folds text from inline definition and subsequent lines' do
3470
3470
  input = <<-EOS
3471
3471
  == Lists
@@ -3474,13 +3474,13 @@ term1:: def1
3474
3474
  continued
3475
3475
  continued
3476
3476
  EOS
3477
-
3477
+
3478
3478
  output = render_embedded_string input
3479
3479
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3480
3480
  assert_xpath '//*[@class="dlist"]//dd', output, 1
3481
3481
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="def1\ncontinued\ncontinued"]), output, 1
3482
3482
  end
3483
-
3483
+
3484
3484
  test 'folds text from inline definition and line following comment line' do
3485
3485
  input = <<-EOS
3486
3486
  == Lists
@@ -3489,13 +3489,13 @@ term1:: def1
3489
3489
  // comment
3490
3490
  continued
3491
3491
  EOS
3492
-
3492
+
3493
3493
  output = render_embedded_string input
3494
3494
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3495
3495
  assert_xpath '//*[@class="dlist"]//dd', output, 1
3496
3496
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="def1\ncontinued"]), output, 1
3497
3497
  end
3498
-
3498
+
3499
3499
  test 'folds text from inline definition and subsequent indented line' do
3500
3500
  input = <<-EOS
3501
3501
  == Lists
@@ -3503,13 +3503,13 @@ continued
3503
3503
  term1:: def1
3504
3504
  continued
3505
3505
  EOS
3506
-
3506
+
3507
3507
  output = render_embedded_string input
3508
3508
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3509
3509
  assert_xpath '//*[@class="dlist"]//dd', output, 1
3510
3510
  assert_xpath %(//*[@class="dlist"]//dd/p[text()="def1\ncontinued"]), output, 1
3511
3511
  end
3512
-
3512
+
3513
3513
  test 'appends literal line offset by blank line as block if item has inline definition' do
3514
3514
  input = <<-EOS
3515
3515
  == Lists
@@ -3518,7 +3518,7 @@ term1:: def1
3518
3518
 
3519
3519
  literal
3520
3520
  EOS
3521
-
3521
+
3522
3522
  output = render_embedded_string input
3523
3523
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3524
3524
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3526,7 +3526,7 @@ term1:: def1
3526
3526
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="literalblock"]', output, 1
3527
3527
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 1
3528
3528
  end
3529
-
3529
+
3530
3530
  test 'appends literal line offset by blank line as block and appends line after continuation as block if item has inline definition' do
3531
3531
  input = <<-EOS
3532
3532
  == Lists
@@ -3537,7 +3537,7 @@ term1:: def1
3537
3537
  +
3538
3538
  para
3539
3539
  EOS
3540
-
3540
+
3541
3541
  output = render_embedded_string input
3542
3542
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3543
3543
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3547,7 +3547,7 @@ para
3547
3547
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]/following-sibling::*[@class="paragraph"]', output, 1
3548
3548
  assert_xpath '//*[@class="dlist"]//dd/*[@class="literalblock"]/following-sibling::*[@class="paragraph"]/p[text()="para"]', output, 1
3549
3549
  end
3550
-
3550
+
3551
3551
  test 'appends line after continuation as block and literal line offset by blank line as block if item has inline definition' do
3552
3552
  input = <<-EOS
3553
3553
  == Lists
@@ -3558,7 +3558,7 @@ para
3558
3558
 
3559
3559
  literal
3560
3560
  EOS
3561
-
3561
+
3562
3562
  output = render_embedded_string input
3563
3563
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3564
3564
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3568,7 +3568,7 @@ para
3568
3568
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]/following-sibling::*[@class="literalblock"]', output, 1
3569
3569
  assert_xpath '//*[@class="dlist"]//dd/*[@class="paragraph"]/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 1
3570
3570
  end
3571
-
3571
+
3572
3572
  test 'appends list if item has inline definition' do
3573
3573
  input = <<-EOS
3574
3574
  == Lists
@@ -3579,14 +3579,14 @@ term1:: def1
3579
3579
  * two
3580
3580
  * three
3581
3581
  EOS
3582
-
3582
+
3583
3583
  output = render_embedded_string input
3584
3584
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3585
3585
  assert_xpath '//*[@class="dlist"]//dd/p[text()="def1"]', output, 1
3586
3586
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="ulist"]', output, 1
3587
3587
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="ulist"]/ul/li', output, 3
3588
3588
  end
3589
-
3589
+
3590
3590
  test 'appends literal line attached by continuation as block if item has inline definition followed by ruler' do
3591
3591
  input = <<-EOS
3592
3592
  == Lists
@@ -3597,7 +3597,7 @@ term1:: def1
3597
3597
 
3598
3598
  '''
3599
3599
  EOS
3600
-
3600
+
3601
3601
  output = render_embedded_string input
3602
3602
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3603
3603
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3606,7 +3606,7 @@ term1:: def1
3606
3606
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="literalblock"]//pre[text()="literal"]', output, 1
3607
3607
  assert_xpath '//*[@class="dlist"]/following-sibling::hr', output, 1
3608
3608
  end
3609
-
3609
+
3610
3610
  test 'line offset by blank line breaks list if term has inline definition' do
3611
3611
  input = <<-EOS
3612
3612
  == Lists
@@ -3615,7 +3615,7 @@ term1:: def1
3615
3615
 
3616
3616
  detached
3617
3617
  EOS
3618
-
3618
+
3619
3619
  output = render_embedded_string input
3620
3620
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3621
3621
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3648,7 +3648,7 @@ Detached
3648
3648
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="sect2"]', output, 1
3649
3649
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="sect2"]/h3[text()="Detached"]', output, 1
3650
3650
  end
3651
-
3651
+
3652
3652
  test 'line attached by continuation is appended as paragraph if term has inline definition followed by detached paragraph' do
3653
3653
  input = <<-EOS
3654
3654
  == Lists
@@ -3659,7 +3659,7 @@ para
3659
3659
 
3660
3660
  detached
3661
3661
  EOS
3662
-
3662
+
3663
3663
  output = render_embedded_string input
3664
3664
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3665
3665
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3669,7 +3669,7 @@ detached
3669
3669
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="paragraph"]', output, 1
3670
3670
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="paragraph"]/p[text()="detached"]', output, 1
3671
3671
  end
3672
-
3672
+
3673
3673
  test 'line attached by continuation is appended as paragraph if term has inline definition followed by detached block' do
3674
3674
  input = <<-EOS
3675
3675
  == Lists
@@ -3682,7 +3682,7 @@ para
3682
3682
  detached
3683
3683
  ****
3684
3684
  EOS
3685
-
3685
+
3686
3686
  output = render_embedded_string input
3687
3687
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3688
3688
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3692,7 +3692,7 @@ detached
3692
3692
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="sidebarblock"]', output, 1
3693
3693
  assert_xpath '//*[@class="dlist"]/following-sibling::*[@class="sidebarblock"]//p[text()="detached"]', output, 1
3694
3694
  end
3695
-
3695
+
3696
3696
  test 'line attached by continuation offset by line comment is appended as paragraph if term has inline definition' do
3697
3697
  input = <<-EOS
3698
3698
  == Lists
@@ -3702,7 +3702,7 @@ term1:: def1
3702
3702
  +
3703
3703
  para
3704
3704
  EOS
3705
-
3705
+
3706
3706
  output = render_embedded_string input
3707
3707
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3708
3708
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3710,7 +3710,7 @@ para
3710
3710
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="paragraph"]', output, 1
3711
3711
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="paragraph"]/p[text()="para"]', output, 1
3712
3712
  end
3713
-
3713
+
3714
3714
  test 'line attached by continuation offset by blank line is appended as paragraph if term has inline definition' do
3715
3715
  input = <<-EOS
3716
3716
  == Lists
@@ -3720,7 +3720,7 @@ term1:: def1
3720
3720
  +
3721
3721
  para
3722
3722
  EOS
3723
-
3723
+
3724
3724
  output = render_embedded_string input
3725
3725
  assert_xpath '//*[@class="dlist"]/dl', output, 1
3726
3726
  assert_xpath '//*[@class="dlist"]//dd', output, 1
@@ -3728,7 +3728,7 @@ para
3728
3728
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="paragraph"]', output, 1
3729
3729
  assert_xpath '//*[@class="dlist"]//dd/p/following-sibling::*[@class="paragraph"]/p[text()="para"]', output, 1
3730
3730
  end
3731
-
3731
+
3732
3732
  test 'line comment offset by blank line divides lists because item has text' do
3733
3733
  input = <<-EOS
3734
3734
  == Lists
@@ -3739,11 +3739,11 @@ term1:: def1
3739
3739
 
3740
3740
  term2:: def2
3741
3741
  EOS
3742
-
3742
+
3743
3743
  output = render_embedded_string input
3744
3744
  assert_xpath '//*[@class="dlist"]/dl', output, 2
3745
3745
  end
3746
-
3746
+
3747
3747
  test 'ruler offset by blank line divides lists because item has text' do
3748
3748
  input = <<-EOS
3749
3749
  == Lists
@@ -3754,11 +3754,11 @@ term1:: def1
3754
3754
 
3755
3755
  term2:: def2
3756
3756
  EOS
3757
-
3757
+
3758
3758
  output = render_embedded_string input
3759
3759
  assert_xpath '//*[@class="dlist"]/dl', output, 2
3760
3760
  end
3761
-
3761
+
3762
3762
  test 'block title offset by blank line divides lists and becomes title of second list because item has text' do
3763
3763
  input = <<-EOS
3764
3764
  == Lists
@@ -3769,7 +3769,7 @@ term1:: def1
3769
3769
 
3770
3770
  term2:: def2
3771
3771
  EOS
3772
-
3772
+
3773
3773
  output = render_embedded_string input
3774
3774
  assert_xpath '//*[@class="dlist"]/dl', output, 2
3775
3775
  assert_xpath '(//*[@class="dlist"])[2]/*[@class="title"][text()="title"]', output, 1
@@ -4097,7 +4097,7 @@ main = putStrLn "Hello, World!" -- <1>
4097
4097
  [{}, {'source-highlighter' => 'coderay'}].each do |attributes|
4098
4098
  output = render_embedded_string input, :attributes => attributes
4099
4099
  assert_xpath '//b', output, 4
4100
- nodes = xmlnodes_at_css 'pre', output
4100
+ nodes = xmlnodes_at_css 'pre', output
4101
4101
  assert_equal %(puts 'Hello, world!' (1)), nodes[0].text
4102
4102
  assert_equal %(println 'Hello, world!' (1)), nodes[1].text
4103
4103
  assert_equal %((def hello (fn [] "Hello, world!")) (1)\n(hello)), nodes[2].text
@@ -4115,7 +4115,7 @@ hello_world() -> io:fwrite("hello, world\n"). % <1>
4115
4115
  EOS
4116
4116
  output = render_embedded_string input
4117
4117
  assert_xpath '//b', output, 1
4118
- nodes = xmlnodes_at_css 'pre', output
4118
+ nodes = xmlnodes_at_css 'pre', output
4119
4119
  assert_equal %(hello_world() -> io:fwrite("hello, world\n"). (1)), nodes[0].text
4120
4120
  end
4121
4121