Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't eat newlines prior to highlights being cleared

  • Loading branch information...
commit b8b6e7fade156f0e8c01a6ed903881322c52e1e9 1 parent 124713f
@rubys authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/gorp/edit.rb
View
4 lib/gorp/edit.rb
@@ -121,12 +121,12 @@ def dup
def clear_highlights
self.gsub! /^ *(\/\/#)\s*(START|END)_HIGHLIGHT\n/, ''
- self.gsub! /^\s*(#|<!--|\/\*)\s*(START|END)_HIGHLIGHT\s*(-->|\*\/)?\n/, ''
+ self.gsub! /^ *(#|<!--|\/\*)\s*(START|END)_HIGHLIGHT\s*?(-->|\*\/)?\n/, ''
end
def clear_all_marks
self.gsub! /^ *(\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\n/, ''
- self.gsub! /^\s*(#|<!--|\/\*|\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\s*(-->|\*\/)?\n/, ''
+ self.gsub! /^ *(#|<!--|\/\*|\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\s*?(-->|\*\/)?\n/, ''
end
def msub pattern, replacement, option=nil
Please sign in to comment.
Something went wrong with that request. Please try again.