Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 408a372

Browse files
committed
feat: update markdown tip parser to handle "todo" and "bug"
1 parent 6c06b2d commit 408a372

File tree

1 file changed

+2
-2
lines changed
  • plugins/plugin-client-common/src/components/Content/Markdown/rehype-tip

1 file changed

+2
-2
lines changed

plugins/plugin-client-common/src/components/Content/Markdown/rehype-tip/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { i18n } from '@kui-shell/core'
1818

1919
const strings = i18n('plugin-client-common', 'markdown')
2020

21-
const RE_TIP = /^([?!][?!][?!])(\+?)\s+(tip|info|note|warning)(\s+"(.+)"\s*)?(\n(.|[\n\r])*)?$/
22-
const RE_TIP_START = /^([?!][?!][?!])(\+?)\s+(tip|info|note|warning)(\s+"(.+))?$/
21+
const RE_TIP = /^([?!][?!][?!])(\+?)\s+(tip|todo|bug|info|note|warning)(\s+"(.+)"\s*)?(\n(.|[\n\r])*)?$/
22+
const RE_TIP_START = /^([?!][?!][?!])(\+?)\s+(tip|todo|bug|info|note|warning)(\s+"(.+))?$/
2323
const RE_TIP_END = /^(.*)"\s*(\n(.|[\n\r])*)?$/
2424

2525
export const START_OF_TIP = `<!-- ____KUI_START_OF_TIP____ -->`

0 commit comments

Comments
 (0)