isodoc 3.6.10 → 3.6.11
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/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/table.rb +7 -11
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82d4992cdf6cebe7c3abf1b624847dc08586213fa57c7ce01e98d86d721cafbf
|
|
4
|
+
data.tar.gz: 0025b823e97539b471833bef1de6424d56d6b569343b6fd414de20b575f46e11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1da939aa2ae8858bd2731a1fdbe0ddaf77cdc7d170655502d4b110ecb1e149ce5e6e9dc8c2cbed77389f2cc8c05977f72e445d8aa28b43276b89080c3a23b8ec
|
|
7
|
+
data.tar.gz: c59cfc4210201281df2a282b7822b5aa76371855db0840defb57f2afd50b617127be738d41b10a1c0512267cf4946ba9b0180eff2437b14b63b334b6d4b93c6d
|
data/lib/isodoc/version.rb
CHANGED
|
@@ -89,23 +89,19 @@ module IsoDoc
|
|
|
89
89
|
# emitted to Word output (Word CSS is too inflexible), but a custom-class
|
|
90
90
|
# table must still render as a normal bordered ISO table.
|
|
91
91
|
# Exception: the internal `rouge-line-table` (sourcecode line numbering)
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
# survives.
|
|
92
|
+
# and `dl` (a definition list rendered as a table) take no ISO border and
|
|
93
|
+
# keep their own class -- returning nil drops the Word MsoISOTable override
|
|
94
|
+
# (see table_attrs) so the HTML super class survives.
|
|
95
|
+
# metanorma/metanorma-pdfa#33
|
|
95
96
|
def table_border_css(node)
|
|
96
97
|
style = "border-spacing:0;border-width:1px;"
|
|
97
|
-
node["style"] || node["plain"] == "true"
|
|
98
|
-
|
|
99
|
-
node["class"] == "rouge-line-table" and style = nil
|
|
98
|
+
node["style"] || node["plain"] == "true" and style = ""
|
|
99
|
+
%w(rouge-line-table dl).include?(node["class"]) and style = nil
|
|
100
100
|
style
|
|
101
101
|
end
|
|
102
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.
|
|
106
103
|
def table_class(node)
|
|
107
|
-
node["plain"] == "true"
|
|
108
|
-
return "MsoNormalTable"
|
|
104
|
+
node["plain"] == "true" and return "MsoNormalTable"
|
|
109
105
|
node.text.length > 4000 ? "MsoISOTableBig" : "MsoISOTable"
|
|
110
106
|
end
|
|
111
107
|
|