asciidoctor-dita-topic 1.0.2 → 1.0.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dita-topic.rb +14 -8
  3. metadata +3 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6f5805b63c0d48906d76f8f7e1b2bd5c639db80d455435040f8a2bad2f9e9d4
4
- data.tar.gz: 1f09b2c11281e306607e0a128579373cd5cf9ef996b2cf2da67ec89804674e0e
3
+ metadata.gz: d45cb29a7858229349b8b0e0720e743bb4ef1f64e1b0a8bab45881857cb99d4b
4
+ data.tar.gz: 702f56d97c748811b7e7debd9863ffdc040e60c139e096dfde85add9c6657ff1
5
5
  SHA512:
6
- metadata.gz: 98822e7e8089ece8e20ee5b31404474ca32c181b2451142e03f62aaf0ef3d7d99201557996a5a5d5a69d9c9fb90fae14858354807932be0e8bc8de28b58d306b
7
- data.tar.gz: d9147d53564a175c223aac1886cc6272fcfbe82e6bb61cb15f835412a662170aae28ec9cfe63b3bccdaa0910fafbc57341d82824a0cf9f378f425030c0b07a79
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 (type = node.attr 'dita-topic-type') =~ /^(concept|reference|task)$/
46
- element = type
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
- element = 'topic'
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 topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
60
- <#{element}#{compose_id (node.id or node.attributes['docname'])}#{outputclass}>
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
- </topic>
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}: Inline callout support not implemented"
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_#{column + cell.colspan - 1}") : ''
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.2
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-06-06 00:00:00.000000000 Z
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: