readme_yard 0.4.0 → 0.6.0

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.
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Top Level Namespace
8
+
9
+ &mdash; Documentation by YARD 0.9.37
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+
41
+
42
+ <span class="title">Top Level Namespace</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Top Level Namespace
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ </div>
80
+
81
+ <h2>Defined Under Namespace</h2>
82
+ <p class="children">
83
+
84
+
85
+
86
+
87
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="ReadmeYard.html" title="ReadmeYard (class)">ReadmeYard</a></span>
88
+
89
+
90
+ </p>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ </div>
101
+
102
+ <div id="footer">
103
+ Generated on Fri May 9 00:45:02 2025 by
104
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
+ 0.9.37 (ruby-3.4.2).
106
+ </div>
107
+
108
+ </div>
109
+ </body>
110
+ </html>
@@ -39,8 +39,13 @@ class ReadmeYard
39
39
  return normalize_value_for_heredoc(string_value) if string_value.strip.start_with?("<<~")
40
40
 
41
41
  # Handle regular string format
42
- string_value.delete_prefix!('"')
43
- string_value.delete_suffix!('"')
42
+ if string_value.start_with?('"')
43
+ string_value.delete_prefix!('"')
44
+ string_value.delete_suffix!('"')
45
+ elsif string_value.start_with?("'")
46
+ string_value.delete_prefix!("'")
47
+ string_value.delete_suffix!("'")
48
+ end
44
49
 
45
50
  # Replace different line continuation patterns
46
51
  # This handles patterns like: " \\\n" and \\\n"
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ReadmeYard
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
+ DOCS_URL = "https://mattruzicka.github.io/readme_yard/"
5
6
  end
@@ -26,13 +26,14 @@ class ReadmeYard
26
26
  warn_about_supported_markdown
27
27
  readme_plugin_opts
28
28
  else
29
- readme_plugin_opts << "--markup markdown\n"
29
+ readme_plugin_opts << "--markup markdown\n--markup-provider redcarpet\n"
30
30
  end
31
31
  end
32
32
 
33
33
  def default_readme_plugin_opts(yardopts_text)
34
34
  readme_opts = +""
35
- readme_opts << "\n" unless yardopts_text.lines.last.include?("\n")
35
+ last_line = yardopts_text.lines.last
36
+ readme_opts << "\n" if last_line && !last_line.include?("\n")
36
37
  readme_opts << "--plugin readme\n"
37
38
  end
38
39
 
data/lib/readme_yard.rb CHANGED
@@ -37,8 +37,6 @@ YARD::Readme::DocstringParser.readme_tag_names = ReadmeYard::TagRegistry.tag_nam
37
37
  # because the custom `{@readme ReadmeYard}` markdown tag is in
38
38
  # README_YARD.md and `readme build` was run at the command line.
39
39
  #
40
- # Here's the [full documentation](https://rubydoc.info/github/mattruzicka/readme_yard).
41
- #
42
40
  class ReadmeYard
43
41
  #
44
42
  # @see #command_line_usage
data/readme_yard.gemspec CHANGED
@@ -14,7 +14,8 @@ Gem::Specification.new do |spec|
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
16
  spec.metadata["source_code_uri"] = spec.homepage
17
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
17
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
18
+ spec.metadata["documentation_uri"] = ReadmeYard::DOCS_URL
18
19
 
19
20
  # Specify which files should be added to the gem when it is released.
20
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -28,6 +29,7 @@ Gem::Specification.new do |spec|
28
29
 
29
30
  # Uncomment to register a new dependency of your gem
30
31
  spec.add_dependency "diffy", "~> 3.4"
32
+ spec.add_dependency "redcarpet", "~> 3.6"
31
33
  spec.add_dependency "tty-markdown", "~> 0.7"
32
34
  spec.add_dependency "yard", "~> 0.9"
33
35
  spec.add_dependency "yard-readme", "~> 0.5"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: readme_yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ruzicka
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '3.4'
26
+ - !ruby/object:Gem::Dependency
27
+ name: redcarpet
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.6'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.6'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: tty-markdown
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -97,6 +111,32 @@ files:
97
111
  - bin/console
98
112
  - bin/readme
99
113
  - bin/setup
114
+ - docs/ReadmeYard.html
115
+ - docs/ReadmeYard/CodeTag.html
116
+ - docs/ReadmeYard/CommentTag.html
117
+ - docs/ReadmeYard/Error.html
118
+ - docs/ReadmeYard/ExampleTag.html
119
+ - docs/ReadmeYard/Logger.html
120
+ - docs/ReadmeYard/ReadmeTag.html
121
+ - docs/ReadmeYard/SourceTag.html
122
+ - docs/ReadmeYard/StringTag.html
123
+ - docs/ReadmeYard/TagRegistry.html
124
+ - docs/ReadmeYard/ValueTag.html
125
+ - docs/ReadmeYard/YardOptsManager.html
126
+ - docs/_index.html
127
+ - docs/class_list.html
128
+ - docs/css/common.css
129
+ - docs/css/full_list.css
130
+ - docs/css/style.css
131
+ - docs/file.README.html
132
+ - docs/file_list.html
133
+ - docs/frames.html
134
+ - docs/index.html
135
+ - docs/js/app.js
136
+ - docs/js/full_list.js
137
+ - docs/js/jquery.js
138
+ - docs/method_list.html
139
+ - docs/top-level-namespace.html
100
140
  - lib/readme_yard.rb
101
141
  - lib/readme_yard/code_tag.rb
102
142
  - lib/readme_yard/comment_tag.rb
@@ -117,7 +157,8 @@ licenses:
117
157
  metadata:
118
158
  homepage_uri: https://github.com/mattruzicka/readme_yard
119
159
  source_code_uri: https://github.com/mattruzicka/readme_yard
120
- changelog_uri: https://github.com/mattruzicka/readme_yard/blob/master/CHANGELOG.md
160
+ changelog_uri: https://github.com/mattruzicka/readme_yard/blob/main/CHANGELOG.md
161
+ documentation_uri: https://mattruzicka.github.io/readme_yard/
121
162
  rdoc_options: []
122
163
  require_paths:
123
164
  - lib