lib/minidusen/parser.rb in minidusen-0.8.1 vs lib/minidusen/parser.rb in minidusen-0.8.2
- old
+ new
@@ -2,10 +2,10 @@
class Parser
class CannotParse < StandardError; end
TEXT_QUERY = /(?:(\-)?"([^"]+)"|(\-)?([\S]+))/
- FIELD_QUERY = /(\-)?(\w+)\:#{TEXT_QUERY}/
+ FIELD_QUERY = /(?:\s|^|(\-))(\w+)\:#{TEXT_QUERY}/
class << self
def parse(object)
case object