asciidoctor-html 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,7 +120,7 @@ module Asciidoctor
120
120
  short_title: @short_title,
121
121
  author: @author,
122
122
  date: @date,
123
- chaptitle: "Search",
123
+ chapsubheading: "Search",
124
124
  langs: []
125
125
  )
126
126
  end
@@ -244,7 +244,6 @@ module Asciidoctor
244
244
  author: @author,
245
245
  date: @date,
246
246
  description: doc.attr("description"),
247
- chaptitle: tdata.chaptitle,
248
247
  chapheading: tdata.chapheading,
249
248
  chapsubheading: tdata.chapsubheading,
250
249
  langs: langs(doc)
@@ -235,7 +235,7 @@ module Asciidoctor
235
235
  classes << "table-striped" if node.option? "striped"
236
236
  classes << "table-bordered" if node.option? "bordered"
237
237
  classes << "table-sm" if node.option? "compact"
238
- classes << "table-v#{node.attr "valign"}" if node.attr?("valign")
238
+ classes << "align-#{node.attr "valign"}" if node.attr?("valign")
239
239
  classes << "table-h#{node.attr "halign"}" if node.attr?("halign")
240
240
  width_attribute = ""
241
241
  if (autowidth = node.option? "autowidth") && !(node.attr? "width")
@@ -14,7 +14,9 @@ module Asciidoctor
14
14
  ("level-#{level} pseudocode" if flat),
15
15
  node.role
16
16
  ].compact
17
- classes << "checklist" if node.option?("checklist")
17
+ classes << "list-checklist" if node.option?("checklist")
18
+ classes << "list-unmarked" if node.option?("unmarked")
19
+ classes << "list-roomy" if node.option?("roomy")
18
20
  result = [%(<#{tag_name}#{Utils.dyn_id_class_attr_str node, classes.join(" ")}>)]
19
21
  node.items.each do |item|
20
22
  result << display_list_item(item)
@@ -27,7 +29,8 @@ module Asciidoctor
27
29
  result = []
28
30
  result << %(<li#{Utils.id_class_attr_str item.id,
29
31
  item.role}><div class="li-mark">#{item.attr "mark"}</div>)
30
- result << %(<div class="li-content"><p>#{item.text}</p>)
32
+ result << %(<div class="li-content">)
33
+ result << %(<p>#{item.text}</p>) unless item.text.empty?
31
34
  result << "\n#{item.content}" if item.blocks?
32
35
  result << %(</div></li>#{Utils.id_class_sel_comment item.id, item.role})
33
36
  result.join "\n"
@@ -4,7 +4,7 @@ module Asciidoctor
4
4
  module Html
5
5
  # Helpers for the table conversion
6
6
  module Table
7
- def self.display_row(node, tsec, row)
7
+ def self.display_row(tsec, row)
8
8
  result = ["<tr>"]
9
9
  row.each do |cell|
10
10
  cell_content = if tsec == :head
@@ -16,8 +16,8 @@ module Asciidoctor
16
16
  end
17
17
  cell_tag_name = (tsec == :head || cell.style == :header ? "th" : "td")
18
18
  cell_attrs = []
19
- cell_attrs << %(halign-#{cell.attr "halign"}) unless node.attr?("halign")
20
- cell_attrs << %(align-#{cell.attr "valign"}) unless node.attr?("valign")
19
+ cell_attrs << %(halign-#{cell.attr "halign"}) unless cell.attr?("halign", "left")
20
+ cell_attrs << %(align-#{cell.attr "valign"}) unless cell.attr?("valign", "top")
21
21
  cell_class_attribute = %( class="#{cell_attrs.join " "}") unless cell_attrs.empty?
22
22
  cell_colspan_attribute = cell.colspan ? %( colspan="#{cell.colspan}") : ""
23
23
  cell_rowspan_attribute = cell.rowspan ? %( rowspan="#{cell.rowspan}") : ""
@@ -32,7 +32,7 @@ module Asciidoctor
32
32
  node.rows.to_h.map do |tsec, rows|
33
33
  next if rows.empty?
34
34
 
35
- "<t#{tsec}>\n#{rows.map { |row| display_row(node, tsec, row) }.join("\n")}\n</t#{tsec}>"
35
+ "<t#{tsec}>\n#{rows.map { |row| display_row(tsec, row) }.join("\n")}\n</t#{tsec}>"
36
36
  end.join("\n")
37
37
  end
38
38
  end
@@ -147,7 +147,7 @@ module Asciidoctor
147
147
  # - description: String
148
148
  # - date: Date
149
149
  # - chapheading: String
150
- # - chaptitle: String
150
+ # - chapsubheading: String
151
151
  # - langs: Array[String]
152
152
  def self.html(content, nav_items, opts = {})
153
153
  nav = (nav_items.size > 1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ravi Rajani