yard 0.9.43 → 0.9.45

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.
@@ -14,21 +14,6 @@ module YARD
14
14
  class HybridMarkdown
15
15
  attr_accessor :from_path
16
16
 
17
- NAMED_ENTITIES = {
18
- 'nbsp' => [0x00A0].pack('U'),
19
- 'copy' => [0x00A9].pack('U'),
20
- 'AElig' => [0x00C6].pack('U'),
21
- 'Dcaron' => [0x010E].pack('U'),
22
- 'frac34' => [0x00BE].pack('U'),
23
- 'HilbertSpace' => [0x210B].pack('U'),
24
- 'DifferentialD' => [0x2146].pack('U'),
25
- 'ClockwiseContourIntegral' => [0x2232].pack('U'),
26
- 'ngE' => [0x2267, 0x0338].pack('U*'),
27
- 'ouml' => [0x00F6].pack('U'),
28
- 'quot' => '"',
29
- 'amp' => '&'
30
- }.freeze
31
-
32
17
  ATX_HEADING_RE = /^\s{0,3}#{Regexp.escape('#')}{1,6}(?=[ \t]|$)/.freeze
33
18
  RDOC_HEADING_RE = /^\s*(=+)[ \t]+(.+?)\s*$/.freeze
34
19
  SETEXT_HEADING_RE = /^\s{0,3}(=+|-+)\s*$/.freeze
@@ -1591,7 +1576,7 @@ module YARD
1591
1576
  end
1592
1577
 
1593
1578
  def whitespace_char?(char)
1594
- char.nil? || char =~ /\s/ || char == NAMED_ENTITIES['nbsp']
1579
+ char.nil? || char =~ /\s/ || char == HtmlEntities::ENTITIES['nbsp']
1595
1580
  end
1596
1581
 
1597
1582
  def punctuation_char?(char)
@@ -1875,8 +1860,7 @@ module YARD
1875
1860
  codepoint = $1.to_i(16)
1876
1861
  else
1877
1862
  name = entity[1..-2]
1878
- return [0x00E4].pack('U') if name == 'auml'
1879
- return NAMED_ENTITIES[name] || CGI.unescapeHTML(entity)
1863
+ return HtmlEntities::ENTITIES[name] || CGI.unescapeHTML(entity)
1880
1864
  end
1881
1865
 
1882
1866
  return [0xFFFD].pack('U') if codepoint.zero?
@@ -11,7 +11,11 @@ module YARD
11
11
  require 'rdoc/markup/to_html'
12
12
  class RDocMarkup; MARKUP = RDoc::Markup end
13
13
  class RDocMarkupToHtml < RDoc::Markup::ToHtml
14
- if defined?(RDoc::VERSION) && RDoc::VERSION >= '4.0.0' &&
14
+ if defined?(RDoc::VERSION) && RDoc::VERSION.to_i >= 8
15
+ def initialize
16
+ super(pipe: true)
17
+ end
18
+ elsif defined?(RDoc::VERSION) && RDoc::VERSION >= '4.0.0' &&
15
19
  defined?(RDoc::Options)
16
20
  def initialize
17
21
  options = RDoc::Options.new
@@ -66,6 +66,8 @@ module YARD
66
66
 
67
67
  # @return [String] formats source code of a constant value
68
68
  def format_constant(value)
69
+ return "" unless value
70
+
69
71
  # last can return nil, so default to empty string
70
72
  sp = value.split("\n").last || ""
71
73
  sp = sp[/^(\s+)/, 1]
data/lib/yard/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module YARD
5
- VERSION = '0.9.43'
5
+ VERSION = '0.9.45'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.43
4
+ version: 0.9.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Segal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-18 00:00:00.000000000 Z
11
+ date: 2026-07-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  YARD is a documentation generation tool for the Ruby programming language.
@@ -261,6 +261,7 @@ files:
261
261
  - lib/yard/templates/helpers/filter_helper.rb
262
262
  - lib/yard/templates/helpers/html_helper.rb
263
263
  - lib/yard/templates/helpers/html_syntax_highlight_helper.rb
264
+ - lib/yard/templates/helpers/markup/html_entities.rb
264
265
  - lib/yard/templates/helpers/markup/hybrid_markdown.rb
265
266
  - lib/yard/templates/helpers/markup/rdoc_markdown.rb
266
267
  - lib/yard/templates/helpers/markup/rdoc_markup.rb
@@ -408,6 +409,7 @@ licenses:
408
409
  metadata:
409
410
  yard.run: yri
410
411
  changelog_uri: https://rubydoc.info/gems/yard/file/CHANGELOG.md
412
+ source_code_uri: https://github.com/lsegal/yard
411
413
  post_install_message:
412
414
  rdoc_options: []
413
415
  require_paths: