Greasemonkey: change PROPS_REGEX to handle non-value keys.

We weren't actually picking up the @noframes greasemonkey directive
because of this. I haven't tested this very extensively but it seems to
work for making the property value optional.
This commit is contained in:
Jimmy 2017-11-01 23:37:53 +13:00
parent 9aeb5775c1
commit 361a1ed6e4

View File

@ -68,7 +68,7 @@ class GreasemonkeyScript:
self.runs_on_sub_frames = False
HEADER_REGEX = r'// ==UserScript==|\n+// ==/UserScript==\n'
PROPS_REGEX = r'// @(?P<prop>[^\s]+)\s+(?P<val>.+)'
PROPS_REGEX = r'// @(?P<prop>[^\s]+)\s*(?P<val>.*)'
@classmethod
def parse(cls, source):