metanorma-plugin-lutaml 0.7.92 → 0.7.93

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: 8ebe0719f9f293b6250a3b2be69a01ce24d6f44038135ba9d1f5fcc8a39e86ff
4
- data.tar.gz: 0ef212191cf03180fed8662894f6f93c7512107a115e55faad91f1011fa84a2c
3
+ metadata.gz: d9011548f28e0b17dfb5f5cda2b3a6abda0c5fbd88ff3de94ac3cae28e5c742c
4
+ data.tar.gz: 61a4428b6ac7d212c2e4ef532065f1ea1e508fbdbe983dabdafb7955e3dd7234
5
5
  SHA512:
6
- metadata.gz: 65fc6f579975be4988e828753c84cd2aca61594160c75bd7c5574511f494b16cd14dbf032f5846ab62427ddaf15361eaf2c5c2200ade07d1eb9cc1605fb71999
7
- data.tar.gz: ea137cfc054c07ee18f7b4cce32e7c9fa9e013c4b1b83314c58f3da18391e3f0c3ecb37a1d9635ed6e00ecdcc81bf309afae12f7f385109a8b108989866798d4
6
+ metadata.gz: df279309cdf6ecc8719160e017c31605185d6639fd158d2379de22bc418f68ea0d24603dda102e96e29ffbb53543e461fab6eb66b0b5e6245a14ca42ffe0c7b6
7
+ data.tar.gz: 461c31bc692807b0d9305a2db75b7b14c28bc0e93827143e0d047dff5e7f5e597a11e1a6337dba27168dd86da05aece5cd9401e0b3b79cc4a1abed2abd222d08
@@ -277,14 +277,29 @@ module Metanorma
277
277
  end
278
278
 
279
279
  class RepoAdapter < Base
280
+ # Decorating a schema stages its EXPRESS-G figures into the
281
+ # document's image folder. A block that selects the schemas it
282
+ # covers (config_yaml) renders only those (ordered_schemas), so
283
+ # only those are decorated: decorating the whole index copied
284
+ # every figure of every indexed schema into the folder.
280
285
  def decorate_remarks(options)
286
+ selected = options["selected_schemas"]
281
287
  @model.schemas.each do |schema|
288
+ next if selected && !selected_schema?(schema, selected)
289
+
282
290
  ExpressRemarkAdapter.for(schema).decorate_remarks(options)
283
291
  end
284
292
  end
285
293
 
286
294
  private
287
295
 
296
+ # The match reorder_schemas uses for the rendered selection.
297
+ def selected_schema?(schema, selected)
298
+ selected.any? do |name|
299
+ schema.id == name || schema.file_basename == name
300
+ end
301
+ end
302
+
288
303
  # NO document-level imagesdir here: metanorma's figure
289
304
  # absolutization joins document.attributes["imagesdir"] with
290
305
  # svgmap-synthesized targets that are ALREADY document-relative
@@ -328,12 +343,28 @@ module Metanorma
328
343
  # remark-bearing form of the same faces — for the models this
329
344
  # adapter decorates only; undecorated prints keep expressir's
330
345
  # plain faces.
346
+ #
347
+ # The base face's round-trip form prints every remark item's
348
+ # raw tag (`(*"schema.entity.__note" text *)`), but keyed prose
349
+ # items print through the document's note machinery, not the
350
+ # listing — so the faces drop the keyed __note/__example items
351
+ # (metanorma-plugin-lutaml#429, the iso-10303 gate regression)
352
+ # and keep the keyed __figure blocks, which stage the
353
+ # EXPRESS-G figures.
354
+ KEYED_PROSE_ITEM = /__(?:note|example)\z/.freeze
355
+
331
356
  class DocumentSourceFormatter < Expressir::Express::Formatter
332
357
  include Expressir::Express::HyperlinkFormatter
333
358
 
334
359
  def owner_tagged_blocks?
335
360
  false
336
361
  end
362
+
363
+ def format_remark_item(node)
364
+ return "" if node.id.to_s.match?(KEYED_PROSE_ITEM)
365
+
366
+ super
367
+ end
337
368
  end
338
369
 
339
370
  class DocumentAdocSourceFormatter < Expressir::Express::Formatter
@@ -342,6 +373,12 @@ module Metanorma
342
373
  def owner_tagged_blocks?
343
374
  false
344
375
  end
376
+
377
+ def format_remark_item(node)
378
+ return "" if node.id.to_s.match?(KEYED_PROSE_ITEM)
379
+
380
+ super
381
+ end
345
382
  end
346
383
 
347
384
  # The adoc face's post-formatting chain, mirroring
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.92".freeze
4
+ VERSION = "0.7.93".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.92
4
+ version: 0.7.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.