diff --git a/src/renderer.ts b/src/renderer.ts index 0c1654f..f6e6a2d 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -9,7 +9,7 @@ const docsLabel = ['docs', 'doc', 'documentation'] const refactorLabel = ['pref', 'refactor'] const noticeLabel = ['notice', 'new component'] -export const CHANGELOG_REG = /-\s([A-Z]+)(?:\(([A-Z\s_-]*)\))?\s*:\s*(.+)/gi +export const CHANGELOG_REG = /-\s([A-Z]+)(?:\(([A-Z\s_-]*)\))?\s*:\s(.+)/gi export const PULL_NUMBER_REG = /in\shttps:\/\/github\.com\/.+\/pull\/(\d+)/g export const SKIP_CHANGELOG_REG = /\[x\] 本条 PR 不需要纳入 Changelog/i export function getPullNumbers(body: string) { diff --git a/test/fixtures/changelog.ts b/test/fixtures/changelog.ts index 9618991..74d4853 100644 --- a/test/fixtures/changelog.ts +++ b/test/fixtures/changelog.ts @@ -20,6 +20,8 @@ export const changelog = ` - fix(test-test): test-test - notice(Component): a new component label in notice - notice(Icon): a new icon label in notice +- 树形组件选项禁用 https://github.com/Tencent/tdesign-vue-next/issues/4809 +- https://github.com/Tencent/tdesign-vue-next/issues/4809 ` export default changelog diff --git a/test/regexp.test.ts b/test/regexp.test.ts index 6a14cac..ed46036 100644 --- a/test/regexp.test.ts +++ b/test/regexp.test.ts @@ -6,7 +6,7 @@ import releaseNotes from './fixtures/release-notes' describe('regexp', () => { it(': CHANGELOG_REG', () => { const records = changelog.matchAll(/-\s/g) - expect([...records].length).toBe(21) + expect([...records].length).toBe(23) const result = changelog.matchAll(CHANGELOG_REG) const arr = [...result]