metanorma-standoc 3.5.21 → 3.5.22

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: 9e40f28438ac296b76abe4f4ac62bc284e2adc46be113c447c390a3c9a45f81d
4
- data.tar.gz: 523dea5caaaf8c1e3cc3822264266ff0c4cd3d10709d907472e5988040fdefe1
3
+ metadata.gz: fc313e79a3b7597ba7779788e1683bba880f0d0ac07fa17190f94eb27e1fa450
4
+ data.tar.gz: 887b7042c8df8946f776b9ecb7f5db2cbff82941aef47fdcd56715a855eeea56
5
5
  SHA512:
6
- metadata.gz: e8c531af2c9b725f3ac254da417858189eef283aa9dc23b2a818f550f9ae02dd9b88b71c1bfd10bed2ba5bebe25f856d0c402fd87d8a9ee1ae60154fca323705
7
- data.tar.gz: efb9d3d13459c7bf0facf770d0e6b568f11d32c26a7ea4cbf6c907e431cf462b23e82868eef40c32b9c9cbf4f2dfa0082443da17a487fbd5caf86a5de36c9525
6
+ metadata.gz: 7dfbeeb00214be8735bd373bb8fe2ec287f26c9997ee44e3baef03c35ec391645a8ed31b3ee87f2b748bea4db535395beb0e1e68ad7aa06b74607af113aa2ee1
7
+ data.tar.gz: c4d1d374cef220f08adeb0b0b8ee287335e0655ffd915abc0b1aa92502e20e99453a8fc2b28bc60657fe72c86abb973655d4f0f4fe7990891d9146095a894c03
@@ -21,9 +21,24 @@ module Metanorma
21
21
  end
22
22
  end
23
23
 
24
+ NO_BULLET_STYLES = %w(nobullet no-bullet).freeze
25
+
26
+ # asciidoctor encodes bulletless lists through the +nobullet+ role
27
+ # ({@.nobullet} or {@options=nobullet}) or the +no-bullet+ option
28
+ # ({@options=no-bullet}); both map to a list @type, which renderers
29
+ # suppress markers for. The ordered list styles +none+ and
30
+ # renderer-native format strings flow through +olist_style+.
31
+ def list_bullet_type(node)
32
+ NO_BULLET_STYLES.each do |s|
33
+ node.role?(s) || node.option?(s) and return s
34
+ end
35
+ nil
36
+ end
37
+
24
38
  def ul_attrs(node)
25
39
  attr_code(id_attr(node).merge(keep_attrs(node)
26
- .merge(display: node.attr("display"),
40
+ .merge(type: list_bullet_type(node),
41
+ display: node.attr("display"),
27
42
  class: node.attr("class"),
28
43
  "display-directives": node.attr("display-directives"))))
29
44
  end
@@ -61,7 +76,7 @@ module Metanorma
61
76
  # as a positional attribute
62
77
  def ol_attrs(node)
63
78
  attr_code(id_attr(node).merge(keep_attrs(node)
64
- .merge(type: olist_style(node.style),
79
+ .merge(type: list_bullet_type(node) || olist_style(node.style),
65
80
  start: node.attr("start"),
66
81
  display: node.attr("display"),
67
82
  class: node.attr("class"),
@@ -63,8 +63,11 @@ requirements:
63
63
  - tag: "text"
64
64
  attributes: ["x", "y", "rotate", "id", "role", "fill", "style", "transform", "font-size", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "font-stretch", "writing-mode", "text-decoration", "clip-path", "mask", "textLength", "lengthAdjust", "opacity"]
65
65
  allowed_children: ["desc", "title", "tspan", "text", "a"]
66
+ # PlantUML emits text-layout attributes (textLength/lengthAdjust,
67
+ # font-*, text-anchor) on g containers; all are valid SVG presentation
68
+ # attributes on container elements (metanorma-pdfa#106).
66
69
  - tag: "g"
67
- attributes: ["label", "class", "id", "role", "fill", "style", "transform", "fill-rule", "visibility", "base", "lang", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "data-name", "clip-path", "clip-rule", "mask", "opacity"]
70
+ attributes: ["label", "class", "id", "role", "fill", "style", "transform", "fill-rule", "visibility", "base", "lang", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "data-name", "clip-path", "clip-rule", "mask", "opacity", "textLength", "lengthAdjust", "font-family", "font-size", "font-weight", "font-style", "text-anchor", "letter-spacing", "word-spacing"]
68
71
  allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc", "image"]
69
72
  - tag: "defs"
70
73
  attributes: ["id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "clip-path", "mask"]
@@ -103,7 +106,7 @@ requirements:
103
106
  attributes: ["id", "role", "fill", "transform", "fill-rule", "target", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "title", "clip-path", "mask"]
104
107
  allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
105
108
  - tag: "tspan"
106
- attributes: ["x", "y", "id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "letter-spacing"]
109
+ attributes: ["x", "y", "id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "letter-spacing", "textLength", "lengthAdjust"]
107
110
  allowed_children: ["desc", "title", "tspan", "text", "a", "tbreak"]
108
111
  - tag: "tbreak"
109
112
  attributes: ["id", "role", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "3.5.21".freeze
22
+ VERSION = "3.5.22".freeze
23
23
  end
24
24
  end
@@ -260,7 +260,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
260
260
  <a:documentation>Type of numbering to be applied to the list items: one of the five named
261
261
  numbering styles, or a renderer-native numbering format string passed
262
262
  through for the target rendering language to expand (e.g. xml2rfc v2
263
- format strings such as "R%d", carried through by metanorma-ietf)</a:documentation>
263
+ format strings such as "R%d", carried through by metanorma-ietf).
264
+ The values `nobullet`, `no-bullet` and `none` do not number the list
265
+ items: they suppress the list markers in rendering.</a:documentation>
264
266
  <choice>
265
267
  <value>roman</value>
266
268
  <value>alphabet</value>
@@ -925,6 +927,18 @@ titlecase, or lowercase</a:documentation>
925
927
  </define>
926
928
  <define name="UlAttributes" combine="interleave">
927
929
  <ref name="BlockAttributes"/>
930
+ <optional>
931
+ <attribute name="type">
932
+ <a:documentation>Directive to suppress the list markers in rendering: the list is
933
+ rendered as a bulletless list. This attribute is not used for
934
+ numbering, unlike the corresponding attribute of `ol`.</a:documentation>
935
+ <choice>
936
+ <value>nobullet</value>
937
+ <value>no-bullet</value>
938
+ <value>none</value>
939
+ </choice>
940
+ </attribute>
941
+ </optional>
928
942
  <optional>
929
943
  <ref name="DisplayDirective"/>
930
944
  </optional>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.21
4
+ version: 3.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.