소스 검색

text.replaceAll("<br>", "<div></div>");

visuddhinanda 3 년 전
부모
커밋
439d886248
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      dashboard/src/components/template/utilities.ts

+ 1 - 0
dashboard/src/components/template/utilities.ts

@@ -23,6 +23,7 @@ export function XmlToReact(
   convertor?: TCodeConvertor
 ): React.ReactNode[] | undefined {
   //console.log("html string:", text);
+  text = text.replaceAll("<br>", "<div></div>");
   const parser = new DOMParser();
   const xmlDoc = parser.parseFromString(
     `<body>${text}</body>`,