summaryrefslogtreecommitdiff
path: root/spec/documentation_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/documentation_helper_spec.rb')
-rw-r--r--spec/documentation_helper_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/documentation_helper_spec.rb b/spec/documentation_helper_spec.rb
index 8da62a29..715e101d 100644
--- a/spec/documentation_helper_spec.rb
+++ b/spec/documentation_helper_spec.rb
@@ -72,5 +72,9 @@ describe Pry::Helpers::DocumentationHelpers do
it "should not remove ++" do
expect(@helper.process_rdoc("--\n comment in a bubble\n++")).to match(/\+\+/)
end
+
+ it "should not syntax highlight already highlighted code" do
+ expect(@helper.process_rdoc(" \e\[31mFOO\e\[0m")).to match(/ \e\[31mFOO\e\[0m/)
+ end
end
end