Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve support for YARD 0.8.1.

  • Loading branch information...
commit caee83fb8b068fef81068e00dc8d1245354536f1 1 parent ace3bc8
@trans trans authored
View
6 lib/yard-tomdoc.rb
@@ -68,11 +68,11 @@ def self.yard_parse(yard, comment)
end
if VERSION > '0.8'
- require 'yard-tomdoc/yard09'
+ require 'yard-tomdoc/yard081'
elsif VERSION == '0.8'
- require 'yard-tomdoc/yard08'
+ require 'yard-tomdoc/yard080'
else
- require 'yard-tomdoc/yard07'
+ require 'yard-tomdoc/yard070'
end
end
View
0  lib/yard-tomdoc/yard07.rb → lib/yard-tomdoc/yard070.rb
File renamed without changes
View
0  lib/yard-tomdoc/yard08.rb → lib/yard-tomdoc/yard080.rb
File renamed without changes
View
9 lib/yard-tomdoc/yard09.rb → lib/yard-tomdoc/yard081.rb
@@ -1,14 +1,17 @@
module YARD
+ # Plugin parser for parsing TomDoc formatted comments.
+ #
class TomDocParser < DocstringParser
+ #
def parse_content(content)
- # TODO: move TomDoc.yard_parse code to here when old version are no longer supported
+ # TODO: move TomDoc.yard_parse code to here when old versions are no longer supported
tomdoc = TomDoc.yard_parse(self, content)
text = tomdoc.description.to_s
# Remove trailing/leading whitespace / newlines
- text.gsub(/\A[\r\n\s]+|[\r\n\s]+\Z/, '')
+ @text = text.gsub(/\A[\r\n\s]+|[\r\n\s]+\Z/, '')
end
public :create_tag
@@ -17,6 +20,6 @@ def parse_content(content)
# Set the parser as default when parsing
YARD::Docstring.default_parser = TomDocParser
- # TODO: what about callback
+ # TODO: what about reset callbacks ?
end
Please sign in to comment.
Something went wrong with that request. Please try again.