isodoc 3.6.7 → 3.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb5eaaa62e081fd25bff232ebc2a38ef74f3d73c4207da35cde420169fbfe0b1
4
- data.tar.gz: baa0b652f47d32440c93e1f0f823ef2ef734ec78bd351f3112d3e2fc14906c2c
3
+ metadata.gz: 9c9a285bb7c95b39b1f1cc20738a296abfc452f1f1770bdf06671692acacf19a
4
+ data.tar.gz: 0f3d972b4de83f203291dcece604258461427d14e675710999ede6d04bf8a236
5
5
  SHA512:
6
- metadata.gz: 711a67de087b11beb0fc089d21e9fe62694fbe5e0d8d1bbd6a37a7fb2b0546c7ba43a95da22cb5073ee4263bee4127e57b5455d7cf3c40c7a020f4a490936947
7
- data.tar.gz: 64d9a08ecd6e2355a738702b843d8873fcf66e191f359b1ef84eac09c57e9f136535f3edc685a96289339c021c743349d6550e9eac92d3417cb42d18d99851a4
6
+ metadata.gz: 8de8909594aef1acfd6f2ed1fc95fe612865f66bdaa9084f31afaf8c5621b8fce713bb1e34a89457223dc5d641d27d50b459b188b661d3a9fa79b783c750c414
7
+ data.tar.gz: 1c61092b52d4e26410c279fa7fb125c7918e9842803dbc144d6552b56c9f2b8a4e5a3f05ddd0e716aca3108f93acb7c106f7b941917db0966196ab48ba5c6b38
@@ -50,11 +50,11 @@ module IsoDoc
50
50
  # @class (metanorma/metanorma-pdfa#33). A non-plain table -- including one
51
51
  # carrying a custom class, or the internal modspec variant -- keeps the
52
52
  # ISO borders. The internal `rouge-line-table` (sourcecode line numbering)
53
- # is the exception: like %plain it is mutually exclusive with MsoISOTable
54
- # and takes no ISO border additions.
53
+ # and `dl` (a definition list rendered as a table) are exceptions: like
54
+ # %plain they are unbordered and mutually exclusive with MsoISOTable.
55
55
  def bordered_table_style(node, klass = nil)
56
56
  node["plain"] == "true" and return ""
57
- klass == "rouge-line-table" and return ""
57
+ %w(rouge-line-table dl).include?(klass) and return ""
58
58
  "border-width:1px;border-spacing:0;"
59
59
  end
60
60
 
@@ -68,12 +68,13 @@ module IsoDoc
68
68
 
69
69
  # metanorma/metanorma-pdfa#33: a custom @class is ADDITIVE -- it augments
70
70
  # the computed base class (MsoISOTable, or "plain" under %plain) rather
71
- # than replacing it, and is orthogonal to bordering. `modspec` and the
72
- # sourcecode line-numbering `rouge-line-table` stay grandfathered internal
73
- # values with replace semantics (mutually exclusive with MsoISOTable).
71
+ # than replacing it, and is orthogonal to bordering. `modspec`, the
72
+ # sourcecode line-numbering `rouge-line-table`, and `dl` (a definition list
73
+ # rendered as a table) stay grandfathered internal values with replace
74
+ # semantics (mutually exclusive with MsoISOTable).
74
75
  def table_html_class(node, custom)
75
76
  node["plain"] == "true" and return ["plain", custom].compact.join(" ")
76
- %w(modspec rouge-line-table).include?(custom) and return custom
77
+ %w(modspec rouge-line-table dl).include?(custom) and return custom
77
78
  ["MsoISOTable", custom].compact.join(" ")
78
79
  end
79
80
 
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.6.7".freeze
2
+ VERSION = "3.6.9".freeze
3
3
  end
@@ -94,13 +94,18 @@ module IsoDoc
94
94
  # survives. metanorma/metanorma-pdfa#33
95
95
  def table_border_css(node)
96
96
  style = "border-spacing:0;border-width:1px;"
97
- node["style"] || node["plain"] == "true" and style = ""
97
+ node["style"] || node["plain"] == "true" ||
98
+ node["class"] == "dl" and style = ""
98
99
  node["class"] == "rouge-line-table" and style = nil
99
100
  style
100
101
  end
101
102
 
103
+ # `dl` (definition list rendered as a table) is unbordered like %plain, and
104
+ # takes the plain MsoNormalTable Word style rather than the bordered
105
+ # MsoISOTable.
102
106
  def table_class(node)
103
- node["plain"] == "true" and return "MsoNormalTable"
107
+ node["plain"] == "true" || node["class"] == "dl" and
108
+ return "MsoNormalTable"
104
109
  node.text.length > 4000 ? "MsoISOTableBig" : "MsoISOTable"
105
110
  end
106
111
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.7
4
+ version: 3.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.