mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-29 16:50:18 +03:00
## Description The Markdown shortcut for creating code blocks currently accepts only alphanumeric language identifiers. This prevents supported languages such as `ts-tags` from being selected through the shortcut. Updated the regular expression to accept hyphens in language identifiers and added a regression test to verify code block creation with TypeScript with Tags. ## Testing Validated through GitHub Actions on my fork. 42 checks passed, 14 were skipped, and no checks failed. Lint, Typecheck and BlockSuite test jobs passed. [[View CI results](https://github.com/ammarkaskar/AFFiNE/pull/1/checks)](https://github.com/ammarkaskar/AFFiNE/pull/1/checks) ## Checklist - [x] I have signed the AFFiNE Contributor License Agreement. - [x] The PR targets the `canary` branch and its title follows Conventional Commits. - [x] Tests are added or updated where it makes sense. - [ ] `yarn lint` and `yarn typecheck` pass locally. - [x] I have carefully reviewed the AI assisted code changes. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Code blocks now recognize language identifiers containing hyphens, such as `ts-tags`. * **Tests** * Added coverage to verify that a hyphenated language identifier displays the expected language label. <!-- end of auto-generated comment: release notes by coderabbit.ai -->