mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
version 0.7.6.1, added slightly better YARD support for syntax
highlighting in show-doc command
This commit is contained in:
parent
f4d7e418af
commit
21eb9c5e0c
3 changed files with 10 additions and 4 deletions
|
@ -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)
|
||||||
|
|
|
@ -4,7 +4,7 @@ require "pry/command_base"
|
||||||
require "pry/pry_instance"
|
require "pry/pry_instance"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require "pry-doc"
|
require "pry-doc"
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ class Pry
|
||||||
# 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
|
||||||
|
|
||||||
|
@ -467,7 +467,9 @@ e.g: eval-file -c self "hello.rb"
|
||||||
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|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
class Pry
|
class Pry
|
||||||
VERSION = "0.7.6"
|
VERSION = "0.7.6.1"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue