asciidoctor-dita-topic 1.5.0 → 1.5.1
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/README.adoc +9 -5
- data/lib/dita-topic/version.rb +1 -1
- data/lib/dita-topic.rb +10 -2
- 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: 9ac51fea23e9f82cc4dddc459c42eb9877f054b22d474d9d020cb0b7876cbfad
|
|
4
|
+
data.tar.gz: 50287798b45a0571cd0538639a0da114e101bfa2297c4a17e24451ceff634fa2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31c8095b9943ad5dde42deb002fff7d0be3975a5bd40a3657612309d38ae6ec39851c170edffd74e38da01d2eef11c8434637c48193cb96cb71e2a79e991f2bd
|
|
7
|
+
data.tar.gz: 8ad53b93870a78a6ec2b0896ce5c620b07a696eee55cc9bd366be8d2ce98962285f6d118533b8684c8254299ce9df3a2f3258657c6dabe5b58ab08f42e7d570a
|
data/README.adoc
CHANGED
|
@@ -312,19 +312,23 @@ DITA provides four metadata attributes that can be used for conditional processi
|
|
|
312
312
|
| DITA Attribute
|
|
313
313
|
| Description
|
|
314
314
|
|
|
315
|
-
| `platform:__value__`
|
|
315
|
+
| `platform:__value__` +
|
|
316
|
+
`pl:__value__`
|
|
316
317
|
| `platform="_value_"`
|
|
317
318
|
| Operating system or hardware architecture.
|
|
318
319
|
|
|
319
|
-
| `product:__value__`
|
|
320
|
+
| `product:__value__` +
|
|
321
|
+
`pr:__value__`
|
|
320
322
|
| `product="_value_"`
|
|
321
323
|
| Product name.
|
|
322
324
|
|
|
323
|
-
| `audience:__value__`
|
|
325
|
+
| `audience:__value__` +
|
|
326
|
+
`au:__value__`
|
|
324
327
|
| `audience="_value_"`
|
|
325
328
|
| Target audience.
|
|
326
329
|
|
|
327
|
-
| `otherprops:__value__`
|
|
330
|
+
| `otherprops:__value__` +
|
|
331
|
+
`op:__value__`
|
|
328
332
|
| `otherprops="_value_"`
|
|
329
333
|
| Additional properties.
|
|
330
334
|
|===
|
|
@@ -333,7 +337,7 @@ For example, to indicate that a particular paragraph is relevant for Linux and m
|
|
|
333
337
|
|
|
334
338
|
[source,asciidoc]
|
|
335
339
|
----
|
|
336
|
-
[role="
|
|
340
|
+
[role="pl:linux pl:mac au:beginner"]
|
|
337
341
|
For more information, see the *bash*(1) manual page.
|
|
338
342
|
----
|
|
339
343
|
|
data/lib/dita-topic/version.rb
CHANGED
data/lib/dita-topic.rb
CHANGED
|
@@ -1050,7 +1050,12 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
|
1050
1050
|
result = {}
|
|
1051
1051
|
|
|
1052
1052
|
# Define supported metadata attributes:
|
|
1053
|
-
valid =
|
|
1053
|
+
valid = {
|
|
1054
|
+
'pl' => 'platform',
|
|
1055
|
+
'pr' => 'product',
|
|
1056
|
+
'au' => 'audience',
|
|
1057
|
+
'op' => 'otherprops'
|
|
1058
|
+
}
|
|
1054
1059
|
|
|
1055
1060
|
# Process each role:
|
|
1056
1061
|
roles.split.each do |role|
|
|
@@ -1060,8 +1065,11 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
|
1060
1065
|
# Separate the attribute name from its value:
|
|
1061
1066
|
attribute, value = role.split ':'
|
|
1062
1067
|
|
|
1068
|
+
# Expand the short attribute variant:
|
|
1069
|
+
attribute = valid[attribute] if valid.key? attribute
|
|
1070
|
+
|
|
1063
1071
|
# Ignore unsupported attribute names:
|
|
1064
|
-
next unless valid.
|
|
1072
|
+
next unless valid.value? attribute
|
|
1065
1073
|
|
|
1066
1074
|
# Append the value to the attribute:
|
|
1067
1075
|
if result.key? attribute
|