kramdown-asciidoc 2.1.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72f332cee31234bcb8b870e8216bb76062a85a66cbdaf05c8aa3a1829677564a
4
- data.tar.gz: e80097972c53c804615741fa8e4b7fe7eb185d173dbb14242ff3c9d7ab1ddf9a
3
+ metadata.gz: 4b026dc30505b178f8854dce27a0b5d9972a6ce80d81e0fdde7eaf8c7a9792d5
4
+ data.tar.gz: ae96a96821d9e9e94fc75f952284e748fb2018debbd6097eb066e8b1666eb1eb
5
5
  SHA512:
6
- metadata.gz: b48abf36246bf94d96f6c5f8ff75962f90ae0ec216c947fd9052d865d0e30a3d2b1cbe50a5d84592c95f2dc830c5c3bd82a56f82410bac3c5c082546d3030407
7
- data.tar.gz: 6654bbe89a6e3dea310df6df79cad09ab0cd911ca0c562d057827dc5751ab79a03ad8d1914dfe69b3346b01356c4e0fc46611beb19705573918fee7d77bc6006
6
+ metadata.gz: b97537e4d267473a0ae9cb8cfab8e89ad01e2a8811f42d9b95bfe06299fec0a1c0fe48979c630ab1b93b380b216a217af1a92b42c272b272e378e6e13e00cffb
7
+ data.tar.gz: d17563c0d85bbced68ef54fa6ed267a00c62de88ac912a38f8518d797c385a5cb707530a681ccb5699a0606d9139b029fb4ab5ded35ecf04a8f452fcc85e1c0e
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,18 @@
5
5
  This document provides a high-level view of the changes to {project-name} by release.
6
6
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
7
7
 
8
+ == 2.1.1 (2025-09-04) - @mojavelinux
9
+
10
+ === Fixed
11
+
12
+ * Convert language tag on source block to lowercase (#106)
13
+ * Turn off system-dependent newline conversion when writing output file
14
+ * Remove direct runtime dependency on rexml as the latest version is already pulled in by kramdown (#122)
15
+
16
+ === Details
17
+
18
+ {url-repo}/releases/tag/v2.1.1[git tag] | {url-repo}/compare/v2.1.0\...v2.1.1[full diff]
19
+
8
20
  == 2.1.0 (2022-07-04) - @mojavelinux
9
21
 
10
22
  === Added
@@ -62,7 +74,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
62
74
 
63
75
  * Upgrade kramdown to 2.3.x and declare kramdown-parser-gfm as runtime dependency (#85)
64
76
  * Don't add source style to listing block when language is specified
65
- * Switch CI to GitHub Actions
77
+ * Switch CI to GitHub Actions (including Windows build)
66
78
  * Run test suite in CI environment on Windows and macOS
67
79
  * Apply style rules to source code
68
80
 
data/Gemfile CHANGED
@@ -4,20 +4,21 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- without = (Bundler.settings['WITHOUT'] || '').split ':'
7
+ gem 'rexml', '~> 3.2.0' if (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '2.5.0')
8
+
9
+ group :coverage do
10
+ gem 'deep-cover-core', '~> 1.1.0', require: false
11
+ gem 'simplecov', '~> 0.21.0', require: false
12
+ end unless (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '2.5.0')
8
13
 
9
14
  group :docs do
10
15
  gem 'asciidoctor', require: false
11
16
  gem 'yard', require: false
12
- end unless without.include? 'docs'
17
+ end
13
18
 
14
19
  group :lint do
15
- gem 'rubocop', '~> 1.28.0', require: false
20
+ gem 'json', '~> 2.6.0', require: false
21
+ gem 'rubocop', '~> 1.36.0', require: false
16
22
  gem 'rubocop-rake', '~> 0.6.0', require: false
17
- gem 'rubocop-rspec', '~> 2.10.0', require: false
18
- end unless without.include? 'lint'
19
-
20
- group :coverage do
21
- gem 'deep-cover-core', '~> 1.1.0', require: false
22
- gem 'simplecov', '~> 0.21.0', require: false
23
- end unless without.include? 'coverage'
23
+ gem 'rubocop-rspec', '~> 2.13.0', require: false
24
+ end unless (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '2.6.0')
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = {project-name} (Markdown to AsciiDoc)
2
2
  Dan Allen <https://github.com/mojavelinux>
3
- v2.1.0, 2022-07-04
3
+ v2.1.1, 2025-09-04
4
4
  // Aliases:
5
5
  :project-name: Kramdown AsciiDoc
6
6
  :project-handle: kramdown-asciidoc
@@ -25,7 +25,7 @@ endif::[]
25
25
  :url-kramdown: https://kramdown.gettalong.org
26
26
  :url-rvm: https://rvm.io
27
27
  :url-rvm-install: https://rvm.io/rvm/install
28
- :url-api-docs: https://www.rubydoc.info/github/asciidoctor/kramdown-asciidoc/master
28
+ :url-api-docs: https://www.rubydoc.info/github/asciidoctor/kramdown-asciidoc
29
29
  :url-gem: https://rubygems.org/gems/kramdown-asciidoc
30
30
  :img-url-gem: https://img.shields.io/gem/v/kramdown-asciidoc.svg?label=gem
31
31
 
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  s.require_paths = ['lib']
33
33
 
34
34
  s.add_runtime_dependency 'kramdown', '~> 2.4.0'
35
- s.add_runtime_dependency 'rexml', '~> 3.2.0'
36
35
  s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1.0'
37
36
 
38
37
  s.add_development_dependency 'rake', '~> 13.0.0'
@@ -63,7 +63,7 @@ module AsciiDoc
63
63
  if (to = opts[:to])
64
64
  if ::Pathname === to || (!(to.respond_to? :write) && (to = ::Pathname.new to.to_s))
65
65
  to.dirname.mkpath
66
- to.write asciidoc, encoding: UTF_8
66
+ to.write asciidoc, encoding: UTF_8, newline: :universal
67
67
  else
68
68
  to.write asciidoc
69
69
  end
@@ -14,12 +14,12 @@ module AsciiDoc
14
14
 
15
15
  opt_parser = ::OptionParser.new do |opts|
16
16
  opts.program_name = 'kramdoc'
17
- opts.banner = <<~EOS
17
+ opts.banner = <<~END
18
18
  Usage: #{opts.program_name} [OPTION]... FILE
19
19
 
20
20
  Converts Markdown to AsciiDoc.
21
21
 
22
- EOS
22
+ END
23
23
 
24
24
  opts.on '-o FILE', '--output=FILE', 'Set the output filename or stream' do |file|
25
25
  options[:output_file] = file
@@ -243,7 +243,7 @@ module AsciiDoc
243
243
  if (lang = el.attr['class'])
244
244
  # NOTE Kramdown always prefixes class with language-
245
245
  # TODO remap lang if requested
246
- lang = lang.slice 9, lang.length
246
+ lang = (lang.slice 9, lang.length).downcase
247
247
  if @diagram_languages.include? lang
248
248
  diagram = true
249
249
  writer.add_line %([#{lang}])
@@ -340,12 +340,11 @@ module AsciiDoc
340
340
  end
341
341
  primary_lines.unshift %(#{indent > 0 ? ' ' * indent : ''}#{marker * level} #{primary_lines.shift})
342
342
  writer.add_lines primary_lines
343
- unless remaining.empty?
344
- if remaining.find {|n| (type = n.type) == :blank ? nil : ((BLOCK_TYPES.include? type) ? true : break) }
345
- el.options[:compound] = true
346
- end
347
- traverse remaining, (opts.merge parent: el)
343
+ return if remaining.empty?
344
+ if remaining.find {|n| (type = n.type) == :blank ? nil : ((BLOCK_TYPES.include? type) ? true : break) }
345
+ el.options[:compound] = true
348
346
  end
347
+ traverse remaining, (opts.merge parent: el)
349
348
  end
350
349
 
351
350
  def convert_dt el, opts
@@ -371,12 +370,11 @@ module AsciiDoc
371
370
  opts[:writer].add_lines primary_lines
372
371
  end
373
372
  end
374
- unless remaining.empty?
375
- if remaining.find {|n| (type = n.type) == :blank ? nil : ((BLOCK_TYPES.include? type) ? true : break) }
376
- el.options[:compound] = true
377
- end
378
- traverse remaining, (opts.merge parent: el)
373
+ return if remaining.empty?
374
+ if remaining.find {|n| (type = n.type) == :blank ? nil : ((BLOCK_TYPES.include? type) ? true : break) }
375
+ el.options[:compound] = true
379
376
  end
377
+ traverse remaining, (opts.merge parent: el)
380
378
  end
381
379
 
382
380
  def convert_table el, opts
@@ -574,7 +572,7 @@ module AsciiDoc
574
572
  opts[:writer].add_lines ['++++', '<script>', el.children[0].value.strip, '</script>', '++++']
575
573
  return
576
574
  elsif tag == 'div' && (child_i = el.children[0]) && child_i.options[:transparent] && (child_i_i = child_i.children[0])
577
- if child_i_i.value == 'span' && ((role = el.attr['class'].to_s).start_with? 'note') && child_i_i.attr['class'] == 'notetitle'
575
+ if child_i_i.value == 'span' && ((role = el.attr['class'].to_s).start_with? 'note') && child_i_i.attr['class'] == 'notetitle' # rubocop:disable Style/GuardClause
578
576
  marker = ADMON_FORMATTED_MARKERS[(to_element child_i_i.children[0]).value] || 'Note'
579
577
  lines = compose_text (child_i.children.drop 1), parent: child_i, strip: true, split: true, wrap: @wrap
580
578
  lines.unshift %(#{ADMON_TYPE_MAP[marker]}: #{lines.shift})
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kramdown
4
4
  module AsciiDoc
5
- VERSION = '2.1.0'
5
+ VERSION = '2.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-asciidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-04 00:00:00.000000000 Z
11
+ date: 2025-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.4.0
27
- - !ruby/object:Gem::Dependency
28
- name: rexml
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 3.2.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 3.2.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: kramdown-parser-gfm
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -129,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
115
  - !ruby/object:Gem::Version
130
116
  version: '0'
131
117
  requirements: []
132
- rubygems_version: 3.3.7
118
+ rubygems_version: 3.3.27
133
119
  signing_key:
134
120
  specification_version: 4
135
121
  summary: A Markdown to AsciiDoc converter based on kramdown