Skip to content

Commit

Permalink
version 0.7.6.1, added slightly better YARD support for syntax
Browse files Browse the repository at this point in the history
highlighting in show-doc command
  • Loading branch information
banister committed Mar 26, 2011
1 parent f4d7e41 commit 21eb9c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,7 @@
26/3/2011 version 0.7.6.1
* added slightly better support for YARD
* now @param and @return tags are colored green and markdown `code` is syntax highlighted using coderay

26/3/2011 version 0.7.6 26/3/2011 version 0.7.6
* `whereami` command now accepts parameter AROUND, to display AROUND lines on eitherside of invocation line. * `whereami` command now accepts parameter AROUND, to display AROUND lines on eitherside of invocation line.
* made it so `whereami` is invoked even if no method exists in current context (i.e in rspec tests) * made it so `whereami` is invoked even if no method exists in current context (i.e in rspec tests)
Expand Down
8 changes: 5 additions & 3 deletions lib/pry/commands.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "pry/pry_instance" require "pry/pry_instance"


begin begin
require "pry-doc" require "pry-doc"
rescue LoadError rescue LoadError
end end


Expand Down Expand Up @@ -175,7 +175,7 @@ class Commands < CommandBase
# FIX ME!!! this line is screwed # FIX ME!!! this line is screwed
# check_for_dynamically_defined_method.call() # check_for_dynamically_defined_method.call()
if file =~ /(\(.*\))|<.*>/ if file =~ /(\(.*\))|<.*>/
output.puts "Cannot find local context." output.puts "Cannot find local context. Did you use `binding.pry` ?"
next next
end end


Expand Down Expand Up @@ -467,7 +467,9 @@ class Commands < CommandBase
gsub(/<em>(?:\s*\n)?(.*?)\s*<\/em>/m) { Pry.color ? "\e[32m#{$1}\e[0m": $1 }. gsub(/<em>(?:\s*\n)?(.*?)\s*<\/em>/m) { Pry.color ? "\e[32m#{$1}\e[0m": $1 }.
gsub(/<i>(?:\s*\n)?(.*?)\s*<\/i>/m) { Pry.color ? "\e[34m#{$1}\e[0m" : $1 }. gsub(/<i>(?:\s*\n)?(.*?)\s*<\/i>/m) { Pry.color ? "\e[34m#{$1}\e[0m" : $1 }.
gsub(/\B\+(\w*?)\+\B/) { Pry.color ? "\e[32m#{$1}\e[0m": $1 }. gsub(/\B\+(\w*?)\+\B/) { Pry.color ? "\e[32m#{$1}\e[0m": $1 }.
gsub(/((?:^[ \t]+.+(?:\n+|\Z))+)/) { Pry.color ? CodeRay.scan($1, code_type).term : $1 } gsub(/((?:^[ \t]+.+(?:\n+|\Z))+)/) { Pry.color ? CodeRay.scan($1, code_type).term : $1 }.
gsub(/`(?:\s*\n)?(.*?)\s*`/) { Pry.color ? CodeRay.scan($1, code_type).term : $1 }.
gsub(/(@param|@return)/) { Pry.color ? "\e[32m#{$1}\e[0m": $1 }
end end


strip_leading_hash_from_ruby_comments = lambda do |comment| strip_leading_hash_from_ruby_comments = lambda do |comment|
Expand Down
2 changes: 1 addition & 1 deletion lib/pry/version.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
class Pry class Pry
VERSION = "0.7.6" VERSION = "0.7.6.1"
end end

0 comments on commit 21eb9c5

Please sign in to comment.