diff --git a/lib/erb/formatter.rb b/lib/erb/formatter.rb index 3e1db4f..9f149ec 100644 --- a/lib/erb/formatter.rb +++ b/lib/erb/formatter.rb @@ -29,7 +29,7 @@ class Error < StandardError; end SPACES = /\s+/m # https://stackoverflow.com/a/317081 - ATTR_NAME = %r{[^\r\n\t\f\v= '"<>]*[^\r\n\t\f\v= '"<>/]} # not ending with a slash + ATTR_NAME = %r{[^\r\n\t\f\v\!= '"<>]*[^\r\n\t\f\v\!= '"<>/]} # not ending with a slash UNQUOTED_VALUE = %r{[^<>'"\s]+} UNQUOTED_ATTR = %r{#{ATTR_NAME}=#{UNQUOTED_VALUE}} SINGLE_QUOTE_ATTR = %r{(?:#{ATTR_NAME}='[^']*?')}m