diff --git a/lib/asciidoctor/converter/semantic_html5.rb b/lib/asciidoctor/converter/semantic_html5.rb index 90afd66140..0d5f2f1129 100644 --- a/lib/asciidoctor/converter/semantic_html5.rb +++ b/lib/asciidoctor/converter/semantic_html5.rb @@ -99,9 +99,9 @@ def convert_thematic_break node def convert_ulist node attributes = common_html_attributes node.id, node.role ret = [%()] - ret << %(#{node.title}) if node.title? + ret << %(
#{node.title}
) if node.title? node.items.each do |item| - ret << %(
  • #{item.text}#{item.blocks? ? %( + ret << %(
  • #{item.text}#{item.blocks? ? %( #{item.content} ) : ''}
  • ) end @@ -122,9 +122,9 @@ def convert_olist node olist_attributes << %( reversed="true") end ret = [%()] - ret << %(#{node.title}) if node.title? + ret << %(
    #{node.title}
    ) if node.title? node.items.each do |item| - ret << %(
  • #{item.text}#{item.blocks? ? %( + ret << %(
  • #{item.text}#{item.blocks? ? %( #{item.content} ) : ''}
  • ) end @@ -143,12 +143,12 @@ def convert_dlist node dlist_attributes << %( type="#{node.list_marker_keyword}") end ret = [%()] - ret << %(#{node.title}) if node.title? + ret << %(
    #{node.title}
    ) if node.title? node.items.each do |terms, desc| terms.each do |term| ret << %(
    #{term.text}
    ) end - ret << %(
    #{desc.text}#{ desc.blocks? ? %( + ret << %(
    #{desc.text}#{ desc.blocks? ? %( #{desc.content} ) : ''}
    ) end diff --git a/test/fixtures/semantic-html5-scenarios/description-list-horizontal.html b/test/fixtures/semantic-html5-scenarios/description-list-horizontal.html index 1f61838e1e..fb37ddc063 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-horizontal.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-horizontal.html @@ -1,8 +1,8 @@
    Description Term 1
    -
    Description Body 1.
    +
    Description Body 1.
    Description Term 2
    -
    Description Body 2.
    +
    Description Body 2.
    Description Term 3
    -
    Description Body 3.
    -
    +
    Description Body 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id-roles.html b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id-roles.html index 0381436ab2..cec2485eb7 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id-roles.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id-roles.html @@ -1,8 +1,8 @@
    Question 1?
    -
    Answer 1.
    +
    Answer 1.
    Question 2?
    -
    Answer 2.
    +
    Answer 2.
    Question 3?
    -
    Answer 3.
    -
    +
    Answer 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id.html b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id.html index 6ac89a5529..07501b325f 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-id.html @@ -1,8 +1,8 @@
    Question 1?
    -
    Answer 1.
    +
    Answer 1.
    Question 2?
    -
    Answer 2.
    +
    Answer 2.
    Question 3?
    -
    Answer 3.
    -
    +
    Answer 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-roles.html b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-roles.html index e62a272a3b..fbb7371fa2 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-roles.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-qanda-with-roles.html @@ -1,8 +1,8 @@
    Question 1?
    -
    Answer 1.
    +
    Answer 1.
    Question 2?
    -
    Answer 2.
    +
    Answer 2.
    Question 3?
    -
    Answer 3.
    -
    +
    Answer 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list-qanda.html b/test/fixtures/semantic-html5-scenarios/description-list-qanda.html index 90aa225ba3..9becdf3621 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-qanda.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-qanda.html @@ -1,8 +1,8 @@
    Question 1?
    -
    Answer 1.
    +
    Answer 1.
    Question 2?
    -
    Answer 2.
    +
    Answer 2.
    Question 3?
    -
    Answer 3.
    -
    +
    Answer 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list-with-title.html b/test/fixtures/semantic-html5-scenarios/description-list-with-title.html index bc0a8159b1..9adc6fdfd1 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list-with-title.html +++ b/test/fixtures/semantic-html5-scenarios/description-list-with-title.html @@ -1,9 +1,9 @@
    -The Description List +
    The Description List
    Description Term 1
    -
    Description Body 1.
    +
    Description Body 1.
    Description Term 2
    -
    Description Body 2.
    +
    Description Body 2.
    Description Term 3
    -
    Description Body 3.
    -
    +
    Description Body 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/description-list.html b/test/fixtures/semantic-html5-scenarios/description-list.html index ed6bffbfcb..93da2f032d 100644 --- a/test/fixtures/semantic-html5-scenarios/description-list.html +++ b/test/fixtures/semantic-html5-scenarios/description-list.html @@ -1,8 +1,8 @@
    Description Term 1
    -
    Description Body 1.
    +
    Description Body 1.
    Description Term 2
    -
    Description Body 2.
    +
    Description Body 2.
    Description Term 3
    -
    Description Body 3.
    -
    +
    Description Body 3.
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.adoc b/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.adoc new file mode 100644 index 0000000000..8e453ccd64 --- /dev/null +++ b/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.adoc @@ -0,0 +1,7 @@ +.The List +. alice +.. subpoint 1 +.. subpoint 2 +. bob +.. subpoint 1 +.. subpoint 2 diff --git a/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.html b/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.html new file mode 100644 index 0000000000..df38f57799 --- /dev/null +++ b/test/fixtures/semantic-html5-scenarios/nested-ordered-list-with-title.html @@ -0,0 +1,15 @@ +
      +
      The List
      +
    1. alice +
        +
      1. subpoint 1
      2. +
      3. subpoint 2
      4. +
      +
    2. +
    3. bob +
        +
      1. subpoint 1
      2. +
      3. subpoint 2
      4. +
      +
    4. +
    \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/nested-ordered-list.html b/test/fixtures/semantic-html5-scenarios/nested-ordered-list.html index 5cf4f98442..5d43e8fa66 100644 --- a/test/fixtures/semantic-html5-scenarios/nested-ordered-list.html +++ b/test/fixtures/semantic-html5-scenarios/nested-ordered-list.html @@ -1,14 +1,14 @@
      -
    1. alice +
    2. alice
        -
      1. subpoint 1
      2. -
      3. subpoint 2
      4. +
      5. subpoint 1
      6. +
      7. subpoint 2
    3. -
    4. bob +
    5. bob
        -
      1. subpoint 1
      2. -
      3. subpoint 2
      4. +
      5. subpoint 1
      6. +
      7. subpoint 2
    6. -
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.adoc b/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.adoc new file mode 100644 index 0000000000..c24f49d89c --- /dev/null +++ b/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.adoc @@ -0,0 +1,7 @@ +.List Title +* alice +** subpoint 1 +** subpoint 2 +* bob +** subpoint 1 +** subpoint 2 diff --git a/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.html b/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.html new file mode 100644 index 0000000000..b882522c00 --- /dev/null +++ b/test/fixtures/semantic-html5-scenarios/nested-unordered-list-with-title.html @@ -0,0 +1,15 @@ +
      +
      List Title
      +
    • alice +
        +
      • subpoint 1
      • +
      • subpoint 2
      • +
      +
    • +
    • bob +
        +
      • subpoint 1
      • +
      • subpoint 2
      • +
      +
    • +
    \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/nested-unordered-list.html b/test/fixtures/semantic-html5-scenarios/nested-unordered-list.html index a67bfa5e51..80c57d1098 100644 --- a/test/fixtures/semantic-html5-scenarios/nested-unordered-list.html +++ b/test/fixtures/semantic-html5-scenarios/nested-unordered-list.html @@ -1,14 +1,14 @@
      -
    • alice +
    • alice
        -
      • subpoint 1
      • -
      • subpoint 2
      • +
      • subpoint 1
      • +
      • subpoint 2
    • -
    • bob +
    • bob
        -
      • subpoint 1
      • -
      • subpoint 2
      • +
      • subpoint 1
      • +
      • subpoint 2
    • -
    + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-roman.html b/test/fixtures/semantic-html5-scenarios/ordered-list-roman.html index b57c5af76d..a50c385904 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-roman.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-roman.html @@ -1,10 +1,10 @@
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. +
    7. step 1
    8. +
    9. step 2
    10. +
    11. step 3
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. -
    +
  • step 1
  • +
  • step 2
  • +
  • step 3
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-with-id-roles.html b/test/fixtures/semantic-html5-scenarios/ordered-list-with-id-roles.html index 3805d45fe7..587d3986e4 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-with-id-roles.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-with-id-roles.html @@ -1,10 +1,10 @@
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. +
    7. step 1
    8. +
    9. step 2
    10. +
    11. step 3
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. -
    +
  • step 1
  • +
  • step 2
  • +
  • step 3
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-with-id.html b/test/fixtures/semantic-html5-scenarios/ordered-list-with-id.html index cde704b601..a571fe6fde 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-with-id.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-with-id.html @@ -1,10 +1,10 @@
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. +
    7. step 1
    8. +
    9. step 2
    10. +
    11. step 3
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. -
    +
  • step 1
  • +
  • step 2
  • +
  • step 3
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-with-reverse.html b/test/fixtures/semantic-html5-scenarios/ordered-list-with-reverse.html index b47d3b571c..2b77acabc0 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-with-reverse.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-with-reverse.html @@ -1,5 +1,5 @@
      -
    1. step 3
    2. -
    3. step 2
    4. -
    5. step 1
    6. -
    +
  • step 3
  • +
  • step 2
  • +
  • step 1
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-with-start.html b/test/fixtures/semantic-html5-scenarios/ordered-list-with-start.html index fe8f9a4fda..de6f084b0b 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-with-start.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-with-start.html @@ -1,5 +1,5 @@
      -
    1. step 3
    2. -
    3. step 4
    4. -
    5. step 5
    6. -
    +
  • step 3
  • +
  • step 4
  • +
  • step 5
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list-with-title.html b/test/fixtures/semantic-html5-scenarios/ordered-list-with-title.html index 4cc77bdb3f..cbe91fa3b9 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list-with-title.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list-with-title.html @@ -1,12 +1,12 @@
      -List A -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. +
      List A
      +
    7. step 1
    8. +
    9. step 2
    10. +
    11. step 3
      -List B -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. -
    +
    List B
    +
  • step 1
  • +
  • step 2
  • +
  • step 3
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/ordered-list.html b/test/fixtures/semantic-html5-scenarios/ordered-list.html index add45aa353..008ffd2825 100644 --- a/test/fixtures/semantic-html5-scenarios/ordered-list.html +++ b/test/fixtures/semantic-html5-scenarios/ordered-list.html @@ -1,10 +1,10 @@
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. +
    7. step 1
    8. +
    9. step 2
    10. +
    11. step 3
      -
    1. step 1
    2. -
    3. step 2
    4. -
    5. step 3
    6. -
    +
  • step 1
  • +
  • step 2
  • +
  • step 3
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/unordered-list-with-id-roles.html b/test/fixtures/semantic-html5-scenarios/unordered-list-with-id-roles.html index 77f861e9e9..9408785b73 100644 --- a/test/fixtures/semantic-html5-scenarios/unordered-list-with-id-roles.html +++ b/test/fixtures/semantic-html5-scenarios/unordered-list-with-id-roles.html @@ -1,4 +1,4 @@
      -
    • alice
    • -
    • bob
    • -
    +
  • alice
  • +
  • bob
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/unordered-list-with-id.html b/test/fixtures/semantic-html5-scenarios/unordered-list-with-id.html index 340e93ceda..249502ce51 100644 --- a/test/fixtures/semantic-html5-scenarios/unordered-list-with-id.html +++ b/test/fixtures/semantic-html5-scenarios/unordered-list-with-id.html @@ -1,4 +1,4 @@
      -
    • alice
    • -
    • bob
    • -
    +
  • alice
  • +
  • bob
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/unordered-list-with-title.html b/test/fixtures/semantic-html5-scenarios/unordered-list-with-title.html index 2ba2698603..1ca9171098 100644 --- a/test/fixtures/semantic-html5-scenarios/unordered-list-with-title.html +++ b/test/fixtures/semantic-html5-scenarios/unordered-list-with-title.html @@ -1,5 +1,5 @@
      -baby names -
    • alice
    • -
    • bob
    • -
    +
    baby names
    +
  • alice
  • +
  • bob
  • + \ No newline at end of file diff --git a/test/fixtures/semantic-html5-scenarios/unordered-list.html b/test/fixtures/semantic-html5-scenarios/unordered-list.html index dbe58fbe95..945952a12e 100644 --- a/test/fixtures/semantic-html5-scenarios/unordered-list.html +++ b/test/fixtures/semantic-html5-scenarios/unordered-list.html @@ -1,4 +1,4 @@
      -
    • alice
    • -
    • bob
    • -
    +
  • alice
  • +
  • bob
  • + \ No newline at end of file