Skip to content

Commit

Permalink
fix(extension): fixed regex mismatch under CRLF (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
forestxieCode authored Feb 10, 2023
1 parent 47fde92 commit 0947726
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/varlet-cli/src/node/shared/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ export const SITE_CONFIG = resolve(CWD, '.varlet/site.config.json')
// template highlight
export const HL_DIR = resolve(CWD, 'highlight')
export const HL_COMPONENT_NAME_RE = /.*(\/|\\)(.+)(\/|\\)docs(\/|\\)/
export const HL_API_RE = /##\s*API\n+/
export const HL_API_RE = /##\s*API(?:\r\n|\n)+/

export const HL_EN_TITLE_ATTRIBUTES_RE = /###\s*Props\s*\n+/
export const HL_EN_TITLE_EVENTS_RE = /###\s*Events\s*\n+/
export const HL_EN_TITLE_SLOTS_RE = /###\s*Slots\s*\n+/
export const HL_EN_TITLE_ATTRIBUTES_RE = /###\s*Props(?:\r\n|\n)+/
export const HL_EN_TITLE_EVENTS_RE = /###\s*Events(?:\r\n|\n)+/
export const HL_EN_TITLE_SLOTS_RE = /###\s*Slots(?:\r\n|\n)+/
export const HL_EN_MD = 'en-US.md'
export const HL_EN_WEB_TYPES_JSON = resolve(HL_DIR, 'web-types.en-US.json')

export const HL_ZH_TITLE_ATTRIBUTES_RE = /###\s*属性\s*\n+/
export const HL_ZH_TITLE_EVENTS_RE = /###\s*事件\s*\n+/
export const HL_ZH_TITLE_SLOTS_RE = /###\s*插槽\s*\n+/
export const HL_ZH_TITLE_ATTRIBUTES_RE = /###\s*属性(?:\r\n|\n)+/
export const HL_ZH_TITLE_EVENTS_RE = /###\s*事件(?:\r\n|\n)+/
export const HL_ZH_TITLE_SLOTS_RE = /###\s*插槽(?:\r\n|\n)+/
export const HL_ZH_MD = 'zh-CN.md'
export const HL_ZH_WEB_TYPES_JSON = resolve(HL_DIR, 'web-types.zh-CN.json')

Expand Down

0 comments on commit 0947726

Please sign in to comment.