fix(editor): handle footnote reference immediately follow URLs when importing markdown (#12449)

Closes: [BS-3525](https://linear.app/affine-design/issue/BS-3525/markdown-adapter-紧跟着链接的-footnote-reference-会被识别成链接的一部分)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Improved handling of footnote references that immediately follow URLs in markdown, ensuring correct spacing and parsing.
- **Bug Fixes**
  - Footnote references after URLs are now parsed correctly, preventing formatting issues.
- **Tests**
  - Added comprehensive test suites to verify footnote reference preprocessing and markdown conversion.
- **Chores**
  - Introduced Vitest as a development dependency and added a dedicated test configuration for the footnote module.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
donteatfriedrice
2025-05-23 03:24:23 +00:00
parent 57d31de854
commit f99b143bf9
8 changed files with 215 additions and 0 deletions

View File

@@ -3480,6 +3480,7 @@ __metadata:
lit-html: "npm:^3.2.1"
lodash-es: "npm:^4.17.21"
rxjs: "npm:^7.8.1"
vitest: "npm:3.1.3"
yjs: "npm:^13.6.21"
zod: "npm:^3.23.8"
languageName: unknown