소스 검색

changed logic to split lines by line code to support three patterns (CRLF, CR, LF).

Ryu Sato 8 년 전
부모
커밋
28b95d1c2e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      resource/js/components/PageEditor/MarkdownTableUtil.js

+ 1 - 1
resource/js/components/PageEditor/MarkdownTableUtil.js

@@ -98,7 +98,7 @@ class MarkdownTableUtil {
    * @param {string} lines all of table
    */
   parseFromTableStringToMarkdownTable(strMDTable) {
-    const arrMDTableLines = strMDTable.split(/[\r\n]+/);
+    const arrMDTableLines = strMDTable.split(/(\r\n|\r|\n)/);
     let contents = [];
     let aligns = [];
     for (let n = 0; n < arrMDTableLines.length; n++) {