Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(856)

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js

Issue 2058513003: DevTools: max length limit for formatting commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove style changes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
index c2146ab67d7ef80e0f13c921b15e5e669c00aba4..c540ffff4e6770ac51736918855da709e4cd65c0 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
@@ -401,6 +401,13 @@ WebInspector.Linkifier.DefaultCSSFormatter.prototype = {
WebInspector.Linkifier.MaxLengthForDisplayedURLs = 150;
/**
+ * The maximum length before strings are considered too long for finding URLs.
+ * @const
+ * @type {number}
+ */
+WebInspector.Linkifier.MaxLengthToIgnoreLinkifier = 10000;
+
+/**
* @interface
*/
WebInspector.Linkifier.LinkHandler = function()
@@ -446,7 +453,7 @@ WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(string, linki
var container = createDocumentFragment();
var linkStringRegEx = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|data:|www\.)[\w$\-_+*'=\|\/\\(){}[\]^%@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({^%@&#~]/;
- while (string && string.length < 10000) {
+ while (string && string.length < WebInspector.Linkifier.MaxLengthToIgnoreLinkifier) {
var linkString = linkStringRegEx.exec(string);
if (!linkString)
break;
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698