ruby-dita 0.4.0 → 0.4.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/lib/ruby-dita/topic.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8deefbe4406900b6cf05917098dc6a20de314c4
|
4
|
+
data.tar.gz: ff7106cbbcb1df4a252a002b430786b85b78c511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4133202207995aef07f5d94ab4f21d53c73d38dbf84a2da6dac00eef7ae493a74a6e8a364c6d8558dc3d75a9c2702ebfdf966088224e5070de798f9a35ab95
|
7
|
+
data.tar.gz: 900a8e6865b64509d49349d330a9523a9bdbe81f6047e2ba66c9a4e7528db449455e61a5cbd4f09e7fdf9315d2d06fb0e712819fbb5eccf424ca0c41a748b5da
|
data/lib/ruby-dita/topic.rb
CHANGED
@@ -4,13 +4,13 @@ module Dita
|
|
4
4
|
include Duxml
|
5
5
|
|
6
6
|
# @param title [String, Element] string or XML rich-text
|
7
|
-
# @param content [Array] optional topic
|
7
|
+
# @param content [Array] optional topic content in array form; added as direct children of <topic>, not <body>
|
8
8
|
# @return [Element] valid Dita <topic>
|
9
9
|
def topic(title, content=nil)
|
10
10
|
t = Element.new('topic')
|
11
11
|
t[:id] = "topic#{t.object_id.to_s}"
|
12
12
|
t << Element.new('title', [title])
|
13
|
-
t <<
|
13
|
+
t << content if content
|
14
14
|
t
|
15
15
|
end
|
16
16
|
end
|