GM: Detect properly the UserScript metadata block on parse (#1964)

Eliminates some false positives
remotes/origin/falkon
Marti Martz 10 years ago committed by David Rosca
parent f93ea0e199
commit ce67c7a455
  1. 2
      src/plugins/GreaseMonkey/gm_script.cpp

@ -238,7 +238,7 @@ void GM_Script::parseScript()
const QString fileData = QString::fromUtf8(file.readAll());
QzRegExp rx(QSL("// ==UserScript==(.*)// ==/UserScript=="));
QzRegExp rx(QSL("(?:^|\\n)// ==UserScript==(.*)\\n// ==/UserScript==(?:\\n|$)"));
rx.indexIn(fileData);
QString metadataBlock = rx.cap(1).trimmed();

Loading…
Cancel
Save