expressir 2.4.59-aarch64-linux → 2.4.60-aarch64-linux
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/expressir/3.2/expressir_core.so +0 -0
- data/lib/expressir/3.3/expressir_core.so +0 -0
- data/lib/expressir/3.4/expressir_core.so +0 -0
- data/lib/expressir/4.0/expressir_core.so +0 -0
- data/lib/expressir/express/formatters/remark_item_formatter.rb +27 -18
- data/lib/expressir/version.rb +1 -1
- 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: 7bd534146e38bce1cb359cb26a194a6d2610bb7e24afb8cd5cac4fb7f266a71f
|
|
4
|
+
data.tar.gz: 0cc618e037f25541dd953a41bc362e676516b906cc30361f2b698980ffb4a61d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9c02402171ba4a5ee42858c3f349614f18e869284371a92a6f113cdb7613d138ab64c371e3f4b923e71ec11add272f763be9d9e4102fbb0bf38fc9c2a56b2e2
|
|
7
|
+
data.tar.gz: c375bba8a55f80a81b58bc8266efa4855009be7cd06b738ac968b13760e34bd65f65fdeb43157c7cc405e4d4000a82a437682906c728c2d81781ea839264926e
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,27 +10,36 @@ module Expressir
|
|
|
10
10
|
def format_remark_item(node)
|
|
11
11
|
return "" unless node.remarks&.any?
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#
|
|
18
|
-
# rooted at the ExpFile, whose id is the file path — drop that
|
|
19
|
-
# leading segment so the tag reads like the source form
|
|
13
|
+
# The tag form follows the owner: items in rule contexts
|
|
14
|
+
# (WHERE/UNIQUE/IP) historically carry bare tags
|
|
15
|
+
# (`--"unusual_placement" text`), WG12-style items carry the
|
|
16
|
+
# schema-relative path. node.path is rooted at the ExpFile,
|
|
17
|
+
# whose id is the file path — drop that leading segment
|
|
20
18
|
# (expressir#603).
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if has_newlines || node.remarks.length > 1
|
|
28
|
-
# Multi-line format: (*"path" remarks *)
|
|
29
|
-
"(*\"#{tag}\"\n#{remarks_text}\n*)"
|
|
19
|
+
rule_context = node.parent.is_a?(Model::Declarations::WhereRule) ||
|
|
20
|
+
node.parent.is_a?(Model::Declarations::UniqueRule) ||
|
|
21
|
+
node.parent.is_a?(Model::Declarations::InformalPropositionRule)
|
|
22
|
+
if rule_context
|
|
23
|
+
tag = node.id.to_s
|
|
30
24
|
else
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
tag = node.path.to_s
|
|
26
|
+
root = node
|
|
27
|
+
root = root.parent while root.respond_to?(:parent) && root.parent
|
|
28
|
+
prefix = "#{root.id}." if root.respond_to?(:id) && root.id
|
|
29
|
+
tag = tag.delete_prefix(prefix) if prefix && tag.start_with?(prefix)
|
|
33
30
|
end
|
|
31
|
+
|
|
32
|
+
# One line per remark. Single-line remarks take the tail form
|
|
33
|
+
# (the dominant inline convention); multi-line text takes the
|
|
34
|
+
# block form, which a tail line cannot express.
|
|
35
|
+
node.remarks.map do |remark|
|
|
36
|
+
remark = remark.to_s
|
|
37
|
+
if remark.include?("\n")
|
|
38
|
+
"(*\"#{tag}\"\n#{remark}\n*)"
|
|
39
|
+
else
|
|
40
|
+
"--\"#{tag}\" #{remark}"
|
|
41
|
+
end
|
|
42
|
+
end.join("\n")
|
|
34
43
|
end
|
|
35
44
|
end
|
|
36
45
|
end
|
data/lib/expressir/version.rb
CHANGED