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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/assets/css/styles.css +2 -2
- data/assets/css/styles.css.map +1 -1
- data/lib/asciidoctor/html/book.rb +1 -2
- data/lib/asciidoctor/html/converter.rb +1 -1
- data/lib/asciidoctor/html/list.rb +5 -2
- data/lib/asciidoctor/html/table.rb +4 -4
- data/lib/asciidoctor/html/template.rb +1 -1
- metadata +1 -1
@@ -120,7 +120,7 @@ module Asciidoctor
|
|
120
120
|
short_title: @short_title,
|
121
121
|
author: @author,
|
122
122
|
date: @date,
|
123
|
-
|
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 << "
|
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"
|
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(
|
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
|
20
|
-
cell_attrs << %(align-#{cell.attr "valign"}) unless
|
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(
|
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
|
-
# -
|
150
|
+
# - chapsubheading: String
|
151
151
|
# - langs: Array[String]
|
152
152
|
def self.html(content, nav_items, opts = {})
|
153
153
|
nav = (nav_items.size > 1)
|