mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-19 07:42:42 +00:00
reduce redundant trim()s
This commit is contained in:
@@ -433,7 +433,7 @@ const CodeEditor = createClass({
|
|||||||
}
|
}
|
||||||
text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`;
|
text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`;
|
||||||
|
|
||||||
text = text.trim().replace('{', '').trim();
|
text = text.replace('{', '').trim();
|
||||||
if(text.length > maxLength)
|
if(text.length > maxLength)
|
||||||
text = `${text.substr(0, maxLength)}...`;
|
text = `${text.substr(0, maxLength)}...`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user