Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't eat newlines prior to highlights being cleared

  • Loading branch information...
commit b8b6e7fade156f0e8c01a6ed903881322c52e1e9 1 parent 124713f
Sam Ruby authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/gorp/edit.rb
4 lib/gorp/edit.rb
@@ -121,12 +121,12 @@ def dup
121 121
122 122 def clear_highlights
123 123 self.gsub! /^ *(\/\/#)\s*(START|END)_HIGHLIGHT\n/, ''
124   - self.gsub! /^\s*(#|<!--|\/\*)\s*(START|END)_HIGHLIGHT\s*(-->|\*\/)?\n/, ''
  124 + self.gsub! /^ *(#|<!--|\/\*)\s*(START|END)_HIGHLIGHT\s*?(-->|\*\/)?\n/, ''
125 125 end
126 126
127 127 def clear_all_marks
128 128 self.gsub! /^ *(\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\n/, ''
129   - self.gsub! /^\s*(#|<!--|\/\*|\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\s*(-->|\*\/)?\n/, ''
  129 + self.gsub! /^ *(#|<!--|\/\*|\/\/#)\s*(START|END)(_HIGHLIGHT|:\w+)\s*?(-->|\*\/)?\n/, ''
130 130 end
131 131
132 132 def msub pattern, replacement, option=nil

0 comments on commit b8b6e7f

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