diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp index b1ab889e0..e50701659 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp @@ -106,6 +106,10 @@ JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec, JSObject*, JSValu } UString result = "/" + asRegExpObject(thisValue)->get(exec, exec->propertyNames().source).toString(exec); +#ifdef QT_BUILD_SCRIPT_LIB + if (result.size() == 1) + result.append("(?:)"); +#endif result.append('/'); if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().global).toBoolean(exec)) result.append('g'); |