فهرست منبع

Ensure not to consider `[text|site](https://example.com]` as a row in the table

Yuki Takei 6 سال پیش
والد
کامیت
499eb01922
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      CHANGES.md
  2. 2 2
      src/client/js/components/PageEditor/MarkdownTableUtil.js

+ 1 - 0
CHANGES.md

@@ -3,6 +3,7 @@
 ## 3.6.2-RC
 
 * Improvement: Reactify admin pages (Customize)
+* Improvement: Ensure not to consider `[text|site](https://example.com]` as a row in the table
 * Fix: Emoji Autocomplete window does not float correctly
     * Introduced by 3.5.0
 

+ 2 - 2
src/client/js/components/PageEditor/MarkdownTableUtil.js

@@ -7,10 +7,10 @@ class MarkdownTableUtil {
 
   constructor() {
     // https://github.com/markdown-it/markdown-it/blob/d29f421927e93e88daf75f22089a3e732e195bd2/lib/rules_block/table.js#L83
-    // https://regex101.com/r/7BN2fR/7
     this.tableAlignmentLineRE = /^[-:|][-:|\s]*$/;
     this.tableAlignmentLineNegRE = /^[^-:]*$/; // it is need to check to ignore empty row which is matched above RE
-    this.linePartOfTableRE = /^\|[^\r\n]*|[^\r\n]*\|$|([^|\r\n]+\|[^|\r\n]*)+/; // own idea
+    // https://regex101.com/r/7BN2fR/8
+    this.linePartOfTableRE = /^\|[^\r\n]*|[^\r\n]*\|$/; // own idea
 
     this.getBot = this.getBot.bind(this);
     this.getEot = this.getEot.bind(this);