Skip to content

Commit 9f14dbf

Browse files
authored
Merge pull request #1069 from cschneid/master
Use String#strip, rather than regex Fixes #1067
2 parents 95d10bf + dc6eedb commit 9f14dbf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/yard/docstring_parser.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ def parse(content, object = nil, handler = nil)
115115
@handler = handler
116116
@reference, @raw_text = detect_reference(content)
117117
text = parse_content(@raw_text)
118-
# Remove trailing/leading whitespace / newlines
119-
@text = text.gsub(/\A[\r\n\s]+|[\r\n\s]+\Z/, '')
118+
@text = text.strip
120119
call_directives_after_parse
121120
post_process
122121
self

0 commit comments

Comments
 (0)