Permalink
Browse files

Improve support for YARD 0.8.1.

  • Loading branch information...
1 parent ace3bc8 commit caee83fb8b068fef81068e00dc8d1245354536f1 @trans trans committed May 3, 2012
View
@@ -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
File renamed without changes.
File renamed without changes.
@@ -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

0 comments on commit caee83f

Please sign in to comment.