From 2c4f3473e51155dd0833a55d711a3e129af3c0ec Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sat, 20 Jul 2024 00:43:02 -0500 Subject: [PATCH] Trim the trailing { on a CSS fold. --- shared/naturalcrit/codeEditor/codeEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index a42484827..c683c3f2e 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -433,7 +433,7 @@ const CodeEditor = createClass({ } text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`; - text = text.trim(); + text = text.trim().replace('{', '').trim(); if(text.length > maxLength) text = `${text.substr(0, maxLength)}...`;