From 56874154a42af52fae3b20da9cc70e8d6cb9c3ae Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Tue, 24 Sep 2024 10:55:56 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index 408d8fd10..735183e3f 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -216,7 +216,7 @@ export default class Header extends ParagraphBase { '([=]+|[-]+)', // (?[=]+|[-]+) ')', ].join(''), - end: '(?=$|\\n)', + end: '(?=$|\\n*)', }; setext.reg = compileRegExp(setext, 'g', true); From f8e5aea9cb232273d4f2c70b2bc608b6c2f6bf84 Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Wed, 25 Sep 2024 20:46:56 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B81,82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index 735183e3f..17f7f95b2 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -210,7 +210,7 @@ export default class Header extends ParagraphBase { begin: '(?:^|\\n)(\\n*)', // (?\\n*) content: [ '(?:\\h*', - '(.+)', // (?.+) + '(.+[\\n]*.+)', // (?.+) ')\\n', '(?:\\h*', '([=]+|[-]+)', // (?[=]+|[-]+) From 35b1539f483de89fd7f87e0eba3070aa932d4301 Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Thu, 26 Sep 2024 22:00:32 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B63?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index 17f7f95b2..5a1bc1b76 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -222,7 +222,7 @@ export default class Header extends ParagraphBase { // atx header const atx = { - begin: '(?:^|\\n)(\\n*)(?:\\h*(#{1,6}))', // (?\\n*), (?#{1,6}) + begin: '(?:^|\\n)(\\n*)(?:\\h*(#{1,6})(?![#]))', // (?\\n*), (?#{1,6}) content: '(.+?)', // '(?.+?)' end: '(?=$|\\n)', }; From 39f862195f768fff0523d8e3553dbca36d3c5f76 Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Tue, 1 Oct 2024 15:46:11 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index 5a1bc1b76..baa1ac5fd 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -222,7 +222,7 @@ export default class Header extends ParagraphBase { // atx header const atx = { - begin: '(?:^|\\n)(\\n*)(?:\\h*(#{1,6})(?![#]))', // (?\\n*), (?#{1,6}) + begin: '(?:^|\\n)(\\n*)(?:\\h{0,3}(#{1,6})(?![#]))', // (?\\n*), (?#{1,6}) content: '(.+?)', // '(?.+?)' end: '(?=$|\\n)', }; From aa5dff682e585252c452ef7cd61c4bcb51acd33c Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Tue, 1 Oct 2024 23:45:01 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Hr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Hr.js b/src/core/hooks/Hr.js index d381a52de..f923fcc0b 100644 --- a/src/core/hooks/Hr.js +++ b/src/core/hooks/Hr.js @@ -31,7 +31,7 @@ export default class Hr extends ParagraphBase { // 计算签名,签名可能会重复,符合预期 const sign = `hr${lineCount}`; const placeHolder = this.pushCache(`
`, sign); - return prependLineFeedForParagraph(match, placeHolder); + return prependLineFeedForParagraph(match, placeHolder,true); }); } From 08bd2a1a1c13621dea2751b42158530149762d37 Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Tue, 1 Oct 2024 23:51:03 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Hr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Hr.js b/src/core/hooks/Hr.js index f923fcc0b..22cfc52ff 100644 --- a/src/core/hooks/Hr.js +++ b/src/core/hooks/Hr.js @@ -31,7 +31,7 @@ export default class Hr extends ParagraphBase { // 计算签名,签名可能会重复,符合预期 const sign = `hr${lineCount}`; const placeHolder = this.pushCache(`
`, sign); - return prependLineFeedForParagraph(match, placeHolder,true); + return prependLineFeedForParagraph(match, placeHolder, true); }); } From 1f7851a4cb54fa1f6eb33a272b297e71b9bb3b6b Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Wed, 2 Oct 2024 11:41:55 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index baa1ac5fd..4aa5c5d15 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -210,7 +210,7 @@ export default class Header extends ParagraphBase { begin: '(?:^|\\n)(\\n*)', // (?\\n*) content: [ '(?:\\h*', - '(.+[\\n]*.+)', // (?.+) + '(.[^=\\-]*[\\n]*.[^=\\-]*)', // (?.+) ')\\n', '(?:\\h*', '([=]+|[-]+)', // (?[=]+|[-]+) From b1b5051a3f4f586248fb7c6fbcad970856bf7586 Mon Sep 17 00:00:00 2001 From: ny9u <604098901@qq.com> Date: Wed, 2 Oct 2024 18:58:59 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/hooks/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hooks/Header.js b/src/core/hooks/Header.js index 4aa5c5d15..2e7796dbe 100644 --- a/src/core/hooks/Header.js +++ b/src/core/hooks/Header.js @@ -222,7 +222,7 @@ export default class Header extends ParagraphBase { // atx header const atx = { - begin: '(?:^|\\n)(\\n*)(?:\\h{0,3}(#{1,6})(?![#]))', // (?\\n*), (?#{1,6}) + begin: '(?:^|\\n)(\\n*)(?:\\h{0,3}(#{1,6})\\h{1,}(?![#]))', // (?\\n*), (?#{1,6}) content: '(.+?)', // '(?.+?)' end: '(?=$|\\n)', };