From 1976cfe2b18a4fdb1e04d931419f444f3ec92a43 Mon Sep 17 00:00:00 2001 From: bonomoon Date: Wed, 2 Dec 2020 06:41:05 +0900 Subject: [PATCH] =?UTF-8?q?add:=20string=20helper=EB=A5=BC=20=EB=A7=8C?= =?UTF-8?q?=EB=93=A4=EA=B3=A0=20html=20=EC=A4=84=EB=B0=94=EA=BF=88=20?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EB=A7=81=20=EB=B3=80=ED=99=98=20=EB=A9=94?= =?UTF-8?q?=EC=86=8C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/util/StringHelper.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/core/util/StringHelper.js diff --git a/src/core/util/StringHelper.js b/src/core/util/StringHelper.js new file mode 100644 index 0000000..4e201c0 --- /dev/null +++ b/src/core/util/StringHelper.js @@ -0,0 +1,11 @@ +export const renderHTMLStringWithNewLine = (str) => { + return str.split("\n").map((line) => { + return ( + + {line} +
+
+ ); + }); +}; +