Permalink
Browse files

"// ==/UserScript==" only ends script header at start of line.

  • Loading branch information...
1 parent a1a47a9 commit 3b96874ee50b3f95ec1bd2eb8838a327a4c746f4 @johan johan committed Dec 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/parseScript.js
View
2 modules/parseScript.js
@@ -9,7 +9,7 @@ Components.utils.import('resource://greasemonkey/util.js');
var gLineSplitRegexp = /.+/g;
var gAllMetaRegexp = new RegExp(
- '^// ==UserScript==([\\s\\S]*?)// ==/UserScript==', 'm');
+ '^// ==UserScript==([\\s\\S]*?)^// ==/UserScript==', 'm');
var gMetaLineRegexp = new RegExp('// @(\\S+)(?:\\s+(.*))?');
/** Parse the source of a script; produce Script object. */

1 comment on commit 3b96874

@arantius
Collaborator

Quite right! Thanks.

Please sign in to comment.