isodoc 3.7.15 → 3.7.17
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/function/footnotes.rb +1 -1
- data/lib/isodoc/sassc_importer.rb +34 -1
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/lists.rb +1 -1
- data/lib/isodoc/xref/xref_anchor.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b77176d43a8c38415974322593e3f8645fe4f557c8066ab18b262751d50f142
|
|
4
|
+
data.tar.gz: '096b610bf213fabddc97290f01ac7dcb902a0bb046d7a258da8ce4b8a4f41054'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0faf187fee391701f81d12b6e44fe1314366efab0d3e4d59714fc9ca8807e53683394684d380d10945cfc3b41eb7f61e20b9780a33f63cd6f8845d34296cf7a
|
|
7
|
+
data.tar.gz: 1b34a74664814e28781c5226b67d4fb4b94b6d26d9dc8edb8719f69b4e2f3cbb0120e81800a4413de107e4412660624cee25e6851cc61c0c1e4d58710c715d8e
|
|
@@ -3,7 +3,7 @@ module IsoDoc
|
|
|
3
3
|
module Footnotes
|
|
4
4
|
def make_table_footnote_link(out, fnid, node)
|
|
5
5
|
attrs = { href: "##{fnid}", class: "TableFootnoteRef" }
|
|
6
|
-
sup = node
|
|
6
|
+
sup = node&.at(ns(".//sup")) and sup.replace(sup.children)
|
|
7
7
|
out.a(**attrs) do |a|
|
|
8
8
|
children_parse(node, a)
|
|
9
9
|
end
|
|
@@ -2,10 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
require "sassc-embedded"
|
|
4
4
|
|
|
5
|
+
# Resolves and reads stylesheet imports on the Ruby side, carrying the
|
|
6
|
+
# contents inline in the Import. The sass helper process then never touches
|
|
7
|
+
# the filesystem for an import — which is what lets the render run against
|
|
8
|
+
# stylesheets that live inside a read-only packaged image (tebako payloads):
|
|
9
|
+
# the helper's own filesystem view does not include the image's paths, so a
|
|
10
|
+
# path-only Import dies helper-side as "Can't find stylesheet to import"
|
|
11
|
+
# (tebako#1056). Reads here go through Ruby's File, which the packaged
|
|
12
|
+
# runtime's IO shims answer from the image on every platform.
|
|
5
13
|
class SasscImporter < SassC::Importer
|
|
6
|
-
def
|
|
14
|
+
def initialize(options)
|
|
15
|
+
super
|
|
16
|
+
@load_paths = Array(options[:load_paths])
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def imports(path, parent_path)
|
|
7
20
|
unless path.match?(/(css|scss)$/)
|
|
21
|
+
resolved = resolve(path, parent_path)
|
|
22
|
+
return Import.new(resolved, source: File.read(resolved)) if resolved
|
|
23
|
+
|
|
24
|
+
# A path Ruby cannot see (a helper-owned or built-in spelling) keeps
|
|
25
|
+
# the historic shape: the name, path-only, resolved by the helper.
|
|
8
26
|
Import.new("#{path}.scss")
|
|
9
27
|
end
|
|
10
28
|
end
|
|
29
|
+
|
|
30
|
+
private
|
|
31
|
+
|
|
32
|
+
# dart-sass's resolution order for the forms isodoc's stylesheets use:
|
|
33
|
+
# the importing file's own directory first, then the load paths; the
|
|
34
|
+
# partial (_-prefixed) spelling beside the plain one.
|
|
35
|
+
def resolve(path, parent_path)
|
|
36
|
+
dirs = [parent_path && File.dirname(parent_path), *@load_paths].compact.uniq
|
|
37
|
+
dirs.each do |dir|
|
|
38
|
+
[File.join(dir, "_#{path}.scss"), File.join(dir, "#{path}.scss")].each do |candidate|
|
|
39
|
+
return candidate if File.file?(candidate)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
nil
|
|
43
|
+
end
|
|
11
44
|
end
|
data/lib/isodoc/version.rb
CHANGED
|
@@ -78,9 +78,20 @@ module IsoDoc
|
|
|
78
78
|
# <title>), semx-wrapped, so that xrefstyle=full can render
|
|
79
79
|
# "Table 3, caption" the way clauses render "Clause 6, Title". Returns nil
|
|
80
80
|
# when the asset has no caption, so anchor_xref_full falls back to short.
|
|
81
|
+
#
|
|
82
|
+
# Footnote references are dropped from the captured caption: this
|
|
83
|
+
# capture is taken while parsing the anchors, before the footnote
|
|
84
|
+
# numbering passes have inserted fmt-fn-label into any copy of the
|
|
85
|
+
# caption. Embedding it into xrefstyle=full cross-reference text
|
|
86
|
+
# would inject footnote references that no fmt-fn-label numbering
|
|
87
|
+
# pass ever reaches, which the HTML/DOC renderers cannot resolve
|
|
88
|
+
# (and would duplicate the caption's own footnote marker in
|
|
89
|
+
# unrelated text).
|
|
81
90
|
def asset_title(node)
|
|
82
91
|
n = node.at(ns("./name")) || node.at(ns("./title")) or return nil
|
|
83
|
-
|
|
92
|
+
c = n.dup
|
|
93
|
+
c.xpath(ns(".//fn | .//fmt-fn-label")).each(&:remove)
|
|
94
|
+
semx(node, c.children.to_xml, n.name)
|
|
84
95
|
end
|
|
85
96
|
|
|
86
97
|
include ::IsoDoc::XrefGen::Util
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: isodoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.7.
|
|
4
|
+
version: 3.7.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|