rdoc-markdown 0.13.0 → 0.13.2

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: 7fb0eeb24c5e69e9a8cc6b5f41f9e83cc8669da4f7f3282c08a8347021536135
4
- data.tar.gz: f36ab292793914871d6bc119493c02bbbe94cb90944ececa98be56b4db7f0446
3
+ metadata.gz: f8d5874e33560a773358b53ee711bb485e0daecde88e51ca7dd95c54046bcede
4
+ data.tar.gz: 876f010a0efd3779ca28d93dd60567b100cc20e28e5aa9fc93446b07fb9be6fe
5
5
  SHA512:
6
- metadata.gz: 5430c965fb823c2e5c384e67d9cc8d9cd91a08749b089ee486d5868bd97d6a4aa9cad417c4ff03028c69ae2ebb5ccc62e50698490d8d6be8c3bd57049ebcb40a
7
- data.tar.gz: e016dfb4a279a0c8283d3455098a84c9f68d4817fbb23cafdf3c1ed2f00b1de9683a2b6a81a161a47321692c07684c5b97c8658ec21cbac0f0647d3a51132137
6
+ metadata.gz: d3bbc5ee66dabe686f3c984a2aeffc251c77c6315646c475b45a2076d039100e034d2cc482c6d1070c8ed49dde3e12a82b2c2350bd90b51103730568ccbf611e
7
+ data.tar.gz: 9d7941c568619a5c149bc844519b90bbe9d25530714a386e4a275286a95226ef308dba5e2c30f6b25b78d989eb9d81270b5a4a4486823b315eb93277d67305c5
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.13.2
6
+
7
+ - Don't add emtpy line break instead of missing metadata
8
+
9
+ ## 0.13.1
10
+
11
+ - reduce metadata escape characters only to absolutely necessary (|, \)
12
+
5
13
  ## 0.13.0
6
14
 
7
15
  - Adding metadata to classes/modules
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rdoc-markdown (0.13.0)
4
+ rdoc-markdown (0.13.2)
5
5
  csv
6
6
  erb
7
7
  rdoc
@@ -376,7 +376,7 @@ class RDoc::Generator::Markdown
376
376
  # @return [String] GFM table-safe Markdown text.
377
377
  def metadata_table_cell(value)
378
378
  value.gsub(/[[:blank:]]*\R[[:blank:]]*/, " ")
379
- .gsub(/[\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]/) { |character| "\\#{character}" }
379
+ .gsub(/[\\|]/) { |character| "\\#{character}" }
380
380
  end
381
381
 
382
382
  # Converts RDoc HTML into GitHub-flavored Markdown.
@@ -5,6 +5,6 @@ module Rdoc
5
5
  # @private
6
6
  module Markdown
7
7
  # @private
8
- VERSION = "0.13.0"
8
+ VERSION = "0.13.2"
9
9
  end
10
10
  end
@@ -2,7 +2,8 @@
2
2
  <%- superclass = klass.superclass if klass.type == "class" -%>
3
3
  <%- includes = klass.includes -%>
4
4
  <%- source_files = klass.in_files -%>
5
- <%- if superclass || !includes.empty? || !source_files.empty? -%>
5
+ <%- has_metadata = superclass || !includes.empty? || !source_files.empty? -%>
6
+ <%- if has_metadata -%>
6
7
 
7
8
  | | |
8
9
  | --- | --- |
@@ -15,17 +16,16 @@
15
16
  <%- unless source_files.empty? -%>
16
17
  | **Defined in** | <%= source_files.map { |file| metadata_table_cell(file.relative_name) }.join(", ") %> |
17
18
  <%- end -%>
18
- <%- end -%>
19
19
 
20
+ <%- end -%>
20
21
  <%- class_description = describe(klass) -%>
21
22
  <%- unless class_description.empty? -%>
22
23
  <%= class_description %>
23
- <%- end -%>
24
24
 
25
+ <%- end -%>
25
26
  <% klass.each_section do |section, constants, attributes| -%>
26
27
  <%- section_title = section.title.to_s.strip -%>
27
28
  <%- unless section_title.empty? -%>
28
-
29
29
  ## <%= section_title %>
30
30
  <%- end -%>
31
31
  <%- section_description = section_description(section, heading_level_offset: 2) -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov