asciidoctor-dita-topic 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dita-topic.rb +14 -8
- metadata +3 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d45cb29a7858229349b8b0e0720e743bb4ef1f64e1b0a8bab45881857cb99d4b
|
4
|
+
data.tar.gz: 702f56d97c748811b7e7debd9863ffdc040e60c139e096dfde85add9c6657ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 989fba23583530694c22087ce3939545b5ebcaeb7eb1f68de87eb69da44be5a5c2ec73362bb89e0bffb9c625e489761d615b35eb0b2682caa18e12f2cea417b9
|
7
|
+
data.tar.gz: 992a47a33f10c3aa5ec87e57d5ca78df2bbc7e6df22fc48cfbe62b50ac4244ae1e3ecb29bf3cb61e8d6e00364c97bf131d613842cbf0265a2e1907fd356a6235
|
data/lib/dita-topic.rb
CHANGED
@@ -42,11 +42,11 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
42
42
|
@titles_allowed = false if (node.attr 'dita-topic-titles') == 'strict'
|
43
43
|
|
44
44
|
# Check if a specific topic type is provided:
|
45
|
-
if (
|
46
|
-
|
45
|
+
if (value = node.attr 'dita-topic-type') =~ /^(concept|reference|task)$/
|
46
|
+
type = value
|
47
47
|
body = (type == 'task') ? 'taskbody' : %(#{type[0,3]}body)
|
48
48
|
else
|
49
|
-
|
49
|
+
type = 'topic'
|
50
50
|
body = 'body'
|
51
51
|
end
|
52
52
|
|
@@ -56,13 +56,13 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
56
56
|
# Return the XML output:
|
57
57
|
<<~EOF.chomp
|
58
58
|
<?xml version='1.0' encoding='utf-8' ?>
|
59
|
-
<!DOCTYPE
|
60
|
-
<#{
|
59
|
+
<!DOCTYPE #{type} PUBLIC "-//OASIS//DTD DITA #{type.capitalize}//EN" "#{type}.dtd">
|
60
|
+
<#{type}#{compose_id (node.id or node.attributes['docname'])}#{outputclass}>
|
61
61
|
<title>#{node.doctitle}</title>
|
62
62
|
<#{body}>
|
63
63
|
#{node.content}
|
64
64
|
</#{body}>
|
65
|
-
|
65
|
+
</#{type}>
|
66
66
|
EOF
|
67
67
|
end
|
68
68
|
|
@@ -251,7 +251,7 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
251
251
|
|
252
252
|
def convert_inline_callout node
|
253
253
|
# Issue a warning if an inline callout is present:
|
254
|
-
logger.warn "#{NAME}:
|
254
|
+
logger.warn "#{NAME}: Callout list support not implemented"
|
255
255
|
return ''
|
256
256
|
end
|
257
257
|
|
@@ -509,7 +509,7 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
509
509
|
# Process each cell:
|
510
510
|
row.each do |cell|
|
511
511
|
# Check if the cell spans multiple columns:
|
512
|
-
colspan = cell.colspan ? %( namest="col_#{colnum = cell.column.attr 'colnumber'}" nameend="col_#{
|
512
|
+
colspan = cell.colspan ? %( namest="col_#{colnum = cell.column.attr 'colnumber'}" nameend="col_#{colnum + cell.colspan - 1}") : ''
|
513
513
|
|
514
514
|
# Check if the cell spans multiple rows:
|
515
515
|
rowspan = cell.rowspan ? %( morerows="#{cell.rowspan - 1}") : ''
|
@@ -700,6 +700,12 @@ class DitaTopic < Asciidoctor::Converter::Base
|
|
700
700
|
add_block_title (result.join LF), node.title, 'horizontal'
|
701
701
|
end
|
702
702
|
|
703
|
+
# Method aliases
|
704
|
+
|
705
|
+
alias convert_embedded content_only
|
706
|
+
alias convert_pass content_only
|
707
|
+
alias convert_toc skip
|
708
|
+
|
703
709
|
# Helper methods
|
704
710
|
|
705
711
|
def add_block_title content, title, context='wrapper'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-dita-topic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaromir Hradilek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -30,34 +30,6 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.0.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: minitest
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 5.22.0
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 5.22.0
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rexml
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 3.2.6
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 3.2.6
|
61
33
|
description: An extension for AsciiDoctor that converts a single AsciiDoc file to
|
62
34
|
a DITA topic.
|
63
35
|
email: jhradilek@gmail.com
|
@@ -72,6 +44,7 @@ licenses:
|
|
72
44
|
metadata:
|
73
45
|
homepage_uri: https://github.com/jhradilek/asciidoctor-dita-topic
|
74
46
|
bug_tracker_uri: https://github.com/jhradilek/asciidoctor-dita-topic/issues
|
47
|
+
documentation_uri: https://github.com/jhradilek/asciidoctor-dita-topic/blob/main/README.adoc
|
75
48
|
post_install_message:
|
76
49
|
rdoc_options: []
|
77
50
|
require_paths:
|