Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

version 0.7.6.1, added slightly better YARD support for syntax

highlighting in show-doc command
  • Loading branch information...
commit 21eb9c5e0cc8d1c9bb7aecd66f6bc1f1840e621b 1 parent f4d7e41
@banister banister authored
Showing with 10 additions and 4 deletions.
  1. +4 −0 CHANGELOG
  2. +5 −3 lib/pry/commands.rb
  3. +1 −1  lib/pry/version.rb
View
4 CHANGELOG
@@ -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
* `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)
View
8 lib/pry/commands.rb
@@ -4,7 +4,7 @@
require "pry/pry_instance"
begin
- require "pry-doc"
+ require "pry-doc"
rescue LoadError
end
@@ -175,7 +175,7 @@ class Commands < CommandBase
# FIX ME!!! this line is screwed
# check_for_dynamically_defined_method.call()
if file =~ /(\(.*\))|<.*>/
- output.puts "Cannot find local context."
+ output.puts "Cannot find local context. Did you use `binding.pry` ?"
next
end
@@ -467,7 +467,9 @@ class Commands < CommandBase
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(/\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
strip_leading_hash_from_ruby_comments = lambda do |comment|
View
2  lib/pry/version.rb
@@ -1,3 +1,3 @@
class Pry
- VERSION = "0.7.6"
+ VERSION = "0.7.6.1"
end

0 comments on commit 21eb9c5

Please sign in to comment.
Something went wrong with that request. Please try again.