yard 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/Rakefile +1 -1
  4. data/docs/Tags.md +10 -9
  5. data/lib/rubygems_plugin.rb +7 -3
  6. data/lib/yard.rb +5 -6
  7. data/lib/yard/autoload.rb +12 -9
  8. data/lib/yard/cli/stats.rb +11 -1
  9. data/lib/yard/cli/yri.rb +2 -2
  10. data/lib/yard/code_objects/base.rb +12 -2
  11. data/lib/yard/code_objects/class_object.rb +2 -0
  12. data/lib/yard/code_objects/class_variable_object.rb +2 -0
  13. data/lib/yard/code_objects/constant_object.rb +2 -0
  14. data/lib/yard/code_objects/method_object.rb +3 -0
  15. data/lib/yard/code_objects/module_object.rb +2 -0
  16. data/lib/yard/code_objects/namespace_mapper.rb +113 -0
  17. data/lib/yard/code_objects/namespace_object.rb +3 -0
  18. data/lib/yard/docstring.rb +1 -1
  19. data/lib/yard/docstring_parser.rb +28 -1
  20. data/lib/yard/handlers/c/handler_methods.rb +1 -0
  21. data/lib/yard/handlers/c/mixin_handler.rb +7 -1
  22. data/lib/yard/handlers/ruby/alias_handler.rb +4 -3
  23. data/lib/yard/handlers/ruby/constant_handler.rb +6 -1
  24. data/lib/yard/handlers/ruby/dsl_handler_methods.rb +20 -3
  25. data/lib/yard/parser/c/comment_parser.rb +1 -1
  26. data/lib/yard/parser/ruby/ruby_parser.rb +25 -5
  27. data/lib/yard/parser/source_parser.rb +1 -0
  28. data/lib/yard/registry.rb +22 -43
  29. data/lib/yard/registry_resolver.rb +171 -0
  30. data/lib/yard/rubygems/hook.rb +164 -0
  31. data/lib/yard/server.rb +2 -1
  32. data/lib/yard/server/commands/root_request_command.rb +27 -0
  33. data/lib/yard/server/commands/static_file_command.rb +3 -16
  34. data/lib/yard/server/doc_server_helper.rb +1 -1
  35. data/lib/yard/server/router.rb +16 -6
  36. data/lib/yard/tags/default_factory.rb +3 -1
  37. data/lib/yard/tags/directives.rb +4 -0
  38. data/lib/yard/templates/engine.rb +1 -1
  39. data/lib/yard/templates/helpers/html_helper.rb +7 -2
  40. data/lib/yard/templates/helpers/module_helper.rb +1 -0
  41. data/lib/yard/templates/helpers/text_helper.rb +12 -0
  42. data/lib/yard/templates/template_options.rb +1 -1
  43. data/lib/yard/version.rb +1 -1
  44. data/spec/cli/stats_spec.rb +8 -3
  45. data/spec/code_objects/base_spec.rb +9 -1
  46. data/spec/docstring_parser_spec.rb +36 -1
  47. data/spec/docstring_spec.rb +1 -6
  48. data/spec/handlers/c/mixin_handler_spec.rb +16 -0
  49. data/spec/handlers/constant_handler_spec.rb +9 -0
  50. data/spec/handlers/dsl_handler_spec.rb +18 -0
  51. data/spec/handlers/examples/dsl_handler_001.rb.txt +29 -0
  52. data/spec/parser/ruby/ruby_parser_spec.rb +42 -0
  53. data/spec/registry_spec.rb +46 -3
  54. data/spec/server/router_spec.rb +1 -1
  55. data/spec/server_spec.rb +9 -0
  56. data/spec/tags/default_factory_spec.rb +5 -0
  57. data/spec/templates/engine_spec.rb +10 -0
  58. data/spec/templates/examples/constant001.txt +2 -2
  59. data/spec/templates/helpers/html_helper_spec.rb +8 -1
  60. data/spec/templates/helpers/module_helper_spec.rb +35 -0
  61. data/spec/templates/helpers/text_helper_spec.rb +20 -0
  62. data/templates/default/module/setup.rb +1 -1
  63. metadata +7 -4
  64. data/spec/server/commands/static_file_command_spec.rb +0 -84
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 601891a952ecd1662fcfaceb1160b3b664bf56d2
4
- data.tar.gz: 979f166173832405bfcea7ba9b2aae33de865f5f
3
+ metadata.gz: ec4f1f12885dba0ad0385e0a1f7bd460275291cd
4
+ data.tar.gz: 2281f497dc0fa185ccc79d8eb5a374bdae40bee2
5
5
  SHA512:
6
- metadata.gz: 8753f755361ae434ae739fd354182f8c5ed6fc5469b6c50d2af9a99bd73694d246b1c4e200cec05f8cc84f674070c2921e6bf8bd947836684f8679ab4896ec8a
7
- data.tar.gz: 1ef05a31710af7aba1837cdbbfa54cad528b7e412e02c37433a8ebb07e6dfc8691e522f17a0ff2e90d4cb5a1d581af383bafb0b43b954c7841a21bc5b15faf0f
6
+ metadata.gz: 81280e2f91643f20e5fda61e118b97b5cb8868ca9eca7b15ff9572d9a65552df404961f7ad2af281e84937a3a6e67367f72d2746eb2add634e06f62cef126676
7
+ data.tar.gz: 4ab74c0f9d79622761098afcc0dd349308500d5593f9ea75414f211207b6798c3475aed0d8936eb4e317df76d6981f5b8499bf1e90ae41d180dc8405335aa829
data/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ # 0.9.1 - July 18th, 2016
2
+
3
+ - Added "Attributes" section to `yard stats`.
4
+ - Added support for RubyGems 2.x `--document=yri,yard` flags. You can now run
5
+ YARD documentation generation against installed gems by running:
6
+ `gem install mygem --document=yard,yri`.
7
+ - Added `/static/*` routing for library-specific routing. This enables static
8
+ template files to be served on a per-library basis instead of globally shared
9
+ across the `yard server`.
10
+ - Added support for inlining of `{include:*}` syntax. Using this syntax in
11
+ the middle of a docstring paragraph will no longer create a separate paragraph
12
+ for the included text.
13
+ - Added support for resolving `{}` syntax in text templates, specifically for
14
+ use in `{include:*}` syntax.
15
+ - Improved object resolution logic in `{Foo::Bar}` syntax and {YARD::Registry.resolve}.
16
+ New resolution logic should now more accurately support resolving compound paths
17
+ across namespaces and through the inheritance tree (as Ruby does).
18
+ - The `frozen_string_literal: true` comment line in Ruby source files will now be
19
+ excluded from docstrings.
20
+ - Added a workaround for https://bugs.ruby-lang.org/issues/11485
21
+ - Fixed an issue where type using a docstring reference on an `@!attribute` macro
22
+ would be incorrectly parsed as a type specifier. This change updates the tag
23
+ parser to disallow newlines between the tag name and opening bracket of the
24
+ type specification.
25
+ - Fixed an issue where `--embed-mixins` would improperly embed methods from
26
+ inherited classes instead of modules.
27
+ - Fixed various parsing errors and YARD exceptions.
28
+ - Added a warning for modules or classes being redefined as constants.
29
+ - Reverted stripping of HTML in {YARD::Docstring#summary}.
30
+ - Added optimization to remove initial docstring parse on newly created code objects.
31
+ - {YARD::CodeObjects::Base#format} now passes the :type parameter to templates.
32
+ - Hide methods with filtered namespaces in Method Listing.
33
+
1
34
  # 0.9.0 - July 4th, 2016
2
35
 
3
36
  Special thanks to Alex Dowad, MSP-Greg, and Alex McLain for their extended
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rbconfig'
4
4
 
5
5
  YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
6
6
 
7
- task :default => :specs
7
+ task :default => :travis_ci
8
8
 
9
9
  desc "Builds the gem"
10
10
  task :gem do
data/docs/Tags.md CHANGED
@@ -97,11 +97,12 @@ following syntaxes are available:
97
97
  Note that for extensibility, other bracket types are allowed, such as `<>`,
98
98
  `()` and `{}`. The contents of the list are discussed in detail below.
99
99
  3. **Freeform data with a name and types specifier list** &mdash; freeform
100
- data beginning with an *optional* types list, as well as a name key. The
101
- name key is *required*. Note that for extensibility, the name can be placed
102
- *before* the types list, like: `name [Types] description`. In this case,
103
- a separating space is not required between the name and types, and you
104
- can still use any of the other brackets that the type specifier list allows.
100
+ data beginning with an *optional* types list, as well as a name key, placed
101
+ either before or after the types list. The name key is *required*. Note that
102
+ for extensibility, the name can be placed *before* the types list, like:
103
+ `name [Types] description`. In this case, a separating space is not required
104
+ between the name and types, and you can still use any of the other brackets
105
+ that the type specifier list allows.
105
106
  4. **Freeform data with title** &mdash; freeform data where the first line cannot
106
107
  be split into multiple lines. The first line must also always refer to the
107
108
  "title" portion, and therefore, if there is no title, the first line must
@@ -190,7 +191,7 @@ The following example shows a method that takes a parameter of any type
190
191
  that responds to the "read" method:
191
192
 
192
193
  # Reads from any I/O object.
193
- # @param [#read] io the input object to read from
194
+ # @param io [#read] the input object to read from
194
195
  def read(io) io.read end
195
196
 
196
197
  #### Hashes
@@ -238,9 +239,9 @@ A reference tag literally copies the tag data by the given tag name from the
238
239
  specified OBJECT. For instance, a method may copy all {tag:param} tags from
239
240
  a given object using the reference tag syntax:
240
241
 
241
- # @param [String] user the username for the operation
242
- # @param [String] host the host that this user is associated with
243
- # @param [Time] time the time that this operation took place
242
+ # @param user [String] the username for the operation
243
+ # @param host [String] the host that this user is associated with
244
+ # @param time [Time] the time that this operation took place
244
245
  def clean(user, host, time = Time.now) end
245
246
 
246
247
  # @param (see #clean)
@@ -1,4 +1,8 @@
1
- unless defined?(Gem::DocManager.load_yardoc)
2
- require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/specification')
3
- require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/doc_manager')
1
+ if defined?(Gem::VERSION) && Gem::VERSION >= "2.0."
2
+ require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/hook')
3
+ else
4
+ unless defined?(Gem::DocManager.load_yardoc)
5
+ require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/specification')
6
+ require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/doc_manager')
7
+ end
4
8
  end
data/lib/yard.rb CHANGED
@@ -1,14 +1,15 @@
1
- require File.expand_path('../yard/version.rb', __FILE__)
2
-
3
1
  module YARD
4
2
  # The root path for YARD source libraries
5
3
  ROOT = File.expand_path(File.dirname(__FILE__))
6
4
 
5
+ require File.join(YARD::ROOT, 'yard', 'version')
6
+ require File.join(YARD::ROOT, 'yard', 'autoload')
7
+
7
8
  # The root path for YARD builtin templates
8
9
  TEMPLATE_ROOT = File.join(ROOT, '..', 'templates')
9
10
 
10
11
  # @deprecated Use {Config::CONFIG_DIR}
11
- CONFIG_DIR = File.expand_path('~/.yard')
12
+ CONFIG_DIR = Config::CONFIG_DIR
12
13
 
13
14
  # An alias to {Parser::SourceParser}'s parsing method
14
15
  #
@@ -63,9 +64,7 @@ end
63
64
  # Backport RubyGems SourceIndex and other classes
64
65
  require File.join(YARD::ROOT, 'yard', 'rubygems', 'backports')
65
66
 
66
- ['autoload', 'globals'].each do |file|
67
- require File.join(YARD::ROOT, 'yard', file)
68
- end
67
+ require File.join(YARD::ROOT, 'yard', 'globals')
69
68
 
70
69
  # Load YARD configuration options (and plugins)
71
70
  YARD::Config.load
data/lib/yard/autoload.rb CHANGED
@@ -36,6 +36,7 @@ module YARD
36
36
  autoload :MacroObject, __p('code_objects/macro_object')
37
37
  autoload :MethodObject, __p('code_objects/method_object')
38
38
  autoload :ModuleObject, __p('code_objects/module_object')
39
+ autoload :NamespaceMapper, __p('code_objects/namespace_mapper')
39
40
  autoload :NamespaceObject, __p('code_objects/namespace_object')
40
41
  autoload :Proxy, __p('code_objects/proxy')
41
42
  autoload :ProxyMethodError, __p('code_objects/proxy')
@@ -216,6 +217,7 @@ module YARD
216
217
  autoload :ListCommand, __p('server/commands/list_command')
217
218
  autoload :LibraryCommand, __p('server/commands/library_command')
218
219
  autoload :LibraryIndexCommand, __p('server/commands/library_index_command')
220
+ autoload :RootRequestCommand, __p('server/commands/root_request_command')
219
221
  autoload :SearchCommand, __p('server/commands/search_command')
220
222
  autoload :StaticFileCommand, __p('server/commands/static_file_command')
221
223
  end
@@ -281,15 +283,16 @@ module YARD
281
283
  autoload :TemplateOptions, __p('templates/template_options')
282
284
  end
283
285
 
284
- autoload :Config, __p('config')
285
- autoload :Docstring, __p('docstring')
286
- autoload :DocstringParser, __p('docstring_parser')
287
- autoload :Logger, __p('logging')
288
- autoload :Options, __p('options')
289
- autoload :Registry, __p('registry')
290
- autoload :RegistryStore, __p('registry_store')
291
- autoload :StubProxy, __p('serializers/yardoc_serializer')
292
- autoload :Verifier, __p('verifier')
286
+ autoload :Config, __p('config')
287
+ autoload :Docstring, __p('docstring')
288
+ autoload :DocstringParser, __p('docstring_parser')
289
+ autoload :Logger, __p('logging')
290
+ autoload :Options, __p('options')
291
+ autoload :Registry, __p('registry')
292
+ autoload :RegistryResolver, __p('registry_resolver')
293
+ autoload :RegistryStore, __p('registry_store')
294
+ autoload :StubProxy, __p('serializers/yardoc_serializer')
295
+ autoload :Verifier, __p('verifier')
293
296
  end
294
297
 
295
298
  undef __p
@@ -8,7 +8,7 @@ module YARD
8
8
  # printed.
9
9
  #
10
10
  # @see #print_statistics
11
- STATS_ORDER = [:files, :modules, :classes, :constants, :methods]
11
+ STATS_ORDER = [:files, :modules, :classes, :constants, :attributes, :methods]
12
12
 
13
13
  # @return [Boolean] whether to parse and load registry
14
14
  attr_accessor :parse
@@ -125,10 +125,20 @@ module YARD
125
125
  output "Constants", *type_statistics(:constant)
126
126
  end
127
127
 
128
+ # Statistics for attributes
129
+ def stats_for_attributes
130
+ objs = all_objects.select {|m| m.type == :method && m.is_attribute? }
131
+ objs.uniq! {|m| m.name.to_s.gsub(/=$/, '') }
132
+ undoc = objs.select {|m| m.docstring.blank? }
133
+ @undoc_list |= undoc if @undoc_list
134
+ output "Attributes", objs.size, undoc.size
135
+ end
136
+
128
137
  # Statistics for methods
129
138
  def stats_for_methods
130
139
  objs = all_objects.select {|m| m.type == :method }
131
140
  objs.reject! {|m| m.is_alias? }
141
+ objs.reject! {|m| m.is_attribute? }
132
142
  undoc = objs.select {|m| m.docstring.blank? }
133
143
  @undoc_list |= undoc if @undoc_list
134
144
  output "Methods", objs.size, undoc.size
data/lib/yard/cli/yri.rb CHANGED
@@ -6,12 +6,12 @@ module YARD
6
6
  class YRI < Command
7
7
  # The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded
8
8
  # from.
9
- CACHE_FILE = File.expand_path('~/.yard/yri_cache')
9
+ CACHE_FILE = File.expand_path(File.join(YARD::Config::CONFIG_DIR, 'yri_cache'))
10
10
 
11
11
  # A file containing all paths, delimited by newlines, to search for
12
12
  # yardoc databases.
13
13
  # @since 0.5.1
14
- SEARCH_PATHS_FILE = File.expand_path('~/.yard/yri_search_paths')
14
+ SEARCH_PATHS_FILE = File.expand_path(File.join(YARD::Config::CONFIG_DIR, 'yri_search_paths'))
15
15
 
16
16
  # Default search paths that should be loaded dynamically into YRI. These paths
17
17
  # take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems
@@ -27,6 +27,7 @@ module YARD
27
27
  alias_method :<<, :push
28
28
  end
29
29
 
30
+ extend NamespaceMapper
30
31
 
31
32
  # Namespace separator
32
33
  NSEP = '::'
@@ -105,12 +106,20 @@ module YARD
105
106
  # though a DSL might create a custom {NamespaceObject} to describe a
106
107
  # specific set of objects.
107
108
  #
109
+ # == Separators
110
+ # Custom classes with different separator tokens should define their own
111
+ # separators using the {NamespaceMapper.register_separator} method. The
112
+ # standard Ruby separators have already been defined ('::', '#', '.', etc).
113
+ #
108
114
  # @abstract This class should not be used directly. Instead, create a
109
- # subclass that implements {#path}, {#sep} or {#type}.
115
+ # subclass that implements {#path}, {#sep} or {#type}. You might also
116
+ # need to register custom separators if {#sep} uses alternate separator
117
+ # tokens.
110
118
  # @see Registry
111
119
  # @see #path
112
120
  # @see #[]=
113
121
  # @see NamespaceObject
122
+ # @see NamespaceMapper.register_separator
114
123
  class Base
115
124
  # The files the object was defined in. To add a file, use {#add_file}.
116
125
  # @return [Array<String>] a list of files
@@ -225,7 +234,7 @@ module YARD
225
234
  @visibility = :public
226
235
  @tags = []
227
236
  @docstrings = {}
228
- @docstring = Docstring.new('', self)
237
+ @docstring = Docstring.new!('', [], self)
229
238
  @namespace = nil
230
239
  self.namespace = namespace
231
240
  yield(self) if block_given?
@@ -480,6 +489,7 @@ module YARD
480
489
  # @see Templates::Engine#render
481
490
  def format(options = {})
482
491
  options = options.merge(:object => self)
492
+ options = options.merge(:type => type) if !options[:type]
483
493
  Templates::Engine.render(options)
484
494
  end
485
495
 
@@ -1,4 +1,6 @@
1
1
  module YARD::CodeObjects
2
+ register_separator NSEP, :class
3
+
2
4
  # A ClassObject represents a Ruby class in source code. It is a {ModuleObject}
3
5
  # with extra inheritance semantics through the superclass.
4
6
  class ClassObject < NamespaceObject
@@ -1,4 +1,6 @@
1
1
  module YARD::CodeObjects
2
+ register_separator NSEP, :class_variable
3
+
2
4
  # Represents a class variable inside a namespace. The path is expressed
3
5
  # in the form "A::B::@@classvariable"
4
6
  class ClassVariableObject < Base
@@ -1,4 +1,6 @@
1
1
  module YARD::CodeObjects
2
+ register_separator NSEP, :constant
3
+
2
4
  # A +ConstantObject+ represents a Ruby constant (not a module or class).
3
5
  # To access the constant's (source code) value, use {#value}.
4
6
  class ConstantObject < Base
@@ -1,4 +1,7 @@
1
1
  module YARD::CodeObjects
2
+ register_separator CSEP, :method
3
+ register_separator ISEP, :method
4
+
2
5
  # Represents a Ruby method in source
3
6
  class MethodObject < Base
4
7
  # The scope of the method (+:class+ or +:instance+)
@@ -1,4 +1,6 @@
1
1
  module YARD::CodeObjects
2
+ register_separator NSEP, :module
3
+
2
4
  # Represents a Ruby module.
3
5
  class ModuleObject < NamespaceObject
4
6
  # Returns the inheritance tree of mixins.
@@ -0,0 +1,113 @@
1
+ module YARD
2
+ module CodeObjects
3
+ # This module controls registration and accessing of namespace separators
4
+ # for {Registry} lookup.
5
+ #
6
+ # @since 0.9.1
7
+ module NamespaceMapper
8
+ # @!group Registering a Separator for a Namespace
9
+
10
+ # Registers a separator with an optional set of valid types that
11
+ # must follow the separator lexically.
12
+ #
13
+ # @param sep [String] the separator string for the namespace
14
+ # @param valid_types [Array<Symbol>] a list of object types that
15
+ # must follow the separator. If the list is empty, any type can
16
+ # follow the separator.
17
+ # @example Registering separators for a method object
18
+ # # Anything after a "#" denotes a method object
19
+ # register_separator "#", :method
20
+ # # Anything after a "." denotes a method object
21
+ # register_separator ".", :method
22
+ def register_separator(sep, *valid_types)
23
+ NamespaceMapper.invalidate
24
+
25
+ valid_types.each do |t|
26
+ NamespaceMapper.rev_map[t] ||= []
27
+ NamespaceMapper.rev_map[t] << sep
28
+ end
29
+
30
+ NamespaceMapper.map[sep] ||= []
31
+ NamespaceMapper.map[sep] += valid_types
32
+ end
33
+
34
+ # Clears the map of separators.
35
+ #
36
+ # @return [void]
37
+ def clear_separators
38
+ NamespaceMapper.invalidate
39
+ NamespaceMapper.map = {}
40
+ NamespaceMapper.rev_map = {}
41
+ end
42
+
43
+ # Gets or sets the default separator value to use when no
44
+ # separator for the namespace can be determined.
45
+ #
46
+ # @param value [String, nil] the default separator, or nil to return the
47
+ # value
48
+ # @example
49
+ # default_separator "::"
50
+ def default_separator(value = nil)
51
+ if value
52
+ NamespaceMapper.default_separator = Regexp.quote value
53
+ else
54
+ NamespaceMapper.default_separator
55
+ end
56
+ end
57
+
58
+ # @!group Separator and Type Lookup Helpers
59
+
60
+ # @return [Array<String>] all of the registered separators
61
+ def separators
62
+ NamespaceMapper.map.keys
63
+ end
64
+
65
+ # @return [Regexp] the regexp match of all separators
66
+ def separators_match
67
+ NamespaceMapper.map_match
68
+ end
69
+
70
+ # @param sep [String] the separator to return types for
71
+ # @return [Array<Symbol>] a list of types registered to a separator
72
+ def types_for_separator(sep)
73
+ NamespaceMapper.map[sep]
74
+ end
75
+
76
+ # @param type [String] the type to return separators for
77
+ # @return [Array<Symbol>] a list of separators registered to a type
78
+ def separators_for_type(type)
79
+ NamespaceMapper.rev_map[type]
80
+ end
81
+
82
+ # Internal methods to act as a singleton registry
83
+ class << self
84
+ # @!visibility private
85
+
86
+ # @return [Hash] a mapping of types to separators
87
+ def map
88
+ @map ||= {}
89
+ end
90
+
91
+ # @return [Hash] a reverse mapping of separators to types
92
+ def rev_map
93
+ @rev_map ||= {}
94
+ end
95
+
96
+ # Invalidates all separators
97
+ # @return [void]
98
+ def invalidate
99
+ @map_match = nil
100
+ end
101
+
102
+ # @return [Regexp] the full list of separators as a regexp match
103
+ def map_match
104
+ @map_match ||= @map.keys.map {|k| Regexp.quote k }.join('|')
105
+ end
106
+
107
+ # @return [String] the default separator when no separator can begin
108
+ # determined.
109
+ attr_accessor :default_separator
110
+ end
111
+ end
112
+ end
113
+ end
@@ -1,4 +1,7 @@
1
1
  module YARD::CodeObjects
2
+ register_separator NSEP, :namespace
3
+ default_separator NSEP
4
+
2
5
  # A "namespace" is any object that can store other objects within itself.
3
6
  # The two main Ruby objects that can act as namespaces are modules
4
7
  # ({ModuleObject}) and classes ({ClassObject}).
@@ -171,7 +171,7 @@ module YARD
171
171
  def summary
172
172
  resolve_reference
173
173
  return @summary if @summary
174
- stripped = self.gsub(/<.+?>/m, '').gsub(/[\r\n](?![\r\n])/, ' ').strip
174
+ stripped = self.gsub(/[\r\n](?![\r\n])/, ' ').strip
175
175
  num_parens = 0
176
176
  idx = length.times do |index|
177
177
  case stripped[index, 1]