Commit 98f0c1af authored by Dong Hwi Lee's avatar Dong Hwi Lee Committed by Commit Bot

Use String.prototype.trim() instead of Regex to trim whitespaces in DocumentXMLTreeViewer.js.

Change-Id: I58b793e966a226895bf6ef917388a7bcab912be1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2053165
Commit-Queue: Dong-Hwi Lee <leedh@google.com>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741082}
parent 57c740c3
...@@ -199,14 +199,9 @@ function processText(parentElement, node) ...@@ -199,14 +199,9 @@ function processText(parentElement, node)
// Processing utils. // Processing utils.
function trim(value)
{
return value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
function isShort(value) function isShort(value)
{ {
return trim(value).length <= 50; return value.trim().length <= 50;
} }
// Tree rendering. // Tree rendering.
...@@ -379,7 +374,6 @@ function initButtons() ...@@ -379,7 +374,6 @@ function initButtons()
expandButton.onclick = expandFunction(sectionId); expandButton.onclick = expandFunction(sectionId);
expandButton.onmousedown = handleButtonMouseDown; expandButton.onmousedown = handleButtonMouseDown;
} }
} }
function handleButtonMouseDown(e) function handleButtonMouseDown(e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment