Skip to content

Commit

Permalink
fix: conflict with callout, when some theme
Browse files Browse the repository at this point in the history
  • Loading branch information
LincZero committed Sep 25, 2024
1 parent 2b69191 commit a3a3af5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/ABConverter/ABReg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const ABReg = {
* - 允许 `%%` 和 `:` 的规则是V3新增的
*/
// 有前缀版本(给选择器用)
reg_header: /^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC|< )[#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 虽然能用`#`但建议后面空一格避免变成“标签”
reg_header_up:/^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC)< [#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 向上检查标志的 头部选择器
reg_header: /^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC|< )[\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 可以用空`|`来解除首字符限制。(`|`注意:可以用来弄严格模式,`#`注意:建议后面空一格避免变成“标签”,`!`注意:别易误触发 `> [!note]`
reg_header_up:/^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC)< [\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 向上检查标志的 头部选择器
reg_mdit_head:/^((\s|>\s|-\s|\*\s|\+\s)*)(:::)\s?(.*)/, // TODO 应该改成 `::::*`
reg_mdit_tail:/^((\s|>\s|-\s|\*\s|\+\s)*)(:::)/,

Expand All @@ -35,8 +35,8 @@ export const ABReg = {
reg_table: /^((\s|>\s|-\s|\*\s|\+\s)*)(\|(.*)\|)/,

// 无前缀版本(给处理器用,处理器不需要处理前缀,前缀在选择器阶段已经被去除了)
reg_header_noprefix: /^((\s)*)(%%)?(\[((?!toc|TOC|< )[#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_up_noprefix:/^((\s)*)(%%)?(\[((?!toc|TOC)< [#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_noprefix: /^((\s)*)(%%)?(\[((?!toc|TOC|< )[\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_up_noprefix:/^((\s)*)(%%)?(\[((?!toc|TOC)< [\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_mdit_head_noprefix:/^((\s)*)(:::)\s?(.*)/,
reg_mdit_tail_noprefix:/^((\s)*)(:::)/,

Expand Down
8 changes: 4 additions & 4 deletions src/config/abReg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const ABReg = {
* - 允许 `%%` 和 `:` 的规则是V3新增的
*/
// 有前缀版本(给选择器用)
reg_header: /^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC|< )[#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 虽然能用`#`但建议后面空一格避免变成“标签”
reg_header_up:/^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC)< [#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 向上检查标志的 头部选择器
reg_header: /^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC|< )[\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 可以用空`|`来解除首字符限制。(`|`注意:可以用来弄严格模式,`#`注意:建议后面空一格避免变成“标签”,`!`注意:别易误触发 `> [!note]`
reg_header_up:/^((\s|>\s|-\s|\*\s|\+\s)*)(%%)?(\[((?!toc|TOC)< [\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/, // 向上检查标志的 头部选择器
reg_mdit_head:/^((\s|>\s|-\s|\*\s|\+\s)*)(:::)\s?(.*)/, // TODO 应该改成 `::::*`
reg_mdit_tail:/^((\s|>\s|-\s|\*\s|\+\s)*)(:::)/,

Expand All @@ -35,8 +35,8 @@ export const ABReg = {
reg_table: /^((\s|>\s|-\s|\*\s|\+\s)*)(\|(.*)\|)/,

// 无前缀版本(给处理器用,处理器不需要处理前缀,前缀在选择器阶段已经被去除了)
reg_header_noprefix: /^((\s)*)(%%)?(\[((?!toc|TOC|< )[#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_up_noprefix:/^((\s)*)(%%)?(\[((?!toc|TOC)< [#!0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_noprefix: /^((\s)*)(%%)?(\[((?!toc|TOC|< )[\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_header_up_noprefix:/^((\s)*)(%%)?(\[((?!toc|TOC)< [\|0-9a-zA-Z\u4e00-\u9fa5].*)\]):?(%%)?\s*$/,
reg_mdit_head_noprefix:/^((\s)*)(:::)\s?(.*)/,
reg_mdit_tail_noprefix:/^((\s)*)(:::)/,

Expand Down

0 comments on commit a3a3af5

Please sign in to comment.