feat(core): support block links on Bi-Directional Links (#8169)

Clsoes [AF-1348](https://linear.app/affine-design/issue/AF-1348/修复-bi-directional-links-里面的链接地址)

* Links to the current document should be ignored on `Backlinks`
* Links to the current document should be ignored on `Outgoing links`

https://github.com/user-attachments/assets/dbc43cea-5aca-4c6f-886a-356e3a91c1f1
This commit is contained in:
fundon
2024-09-11 11:08:12 +00:00
parent b7d05d2078
commit b74dd1c92e
10 changed files with 221 additions and 98 deletions
+10
View File
@@ -31,3 +31,13 @@ export function buildAppUrl(path: string, opts: AppUrlOptions = {}) {
return new URL(path, webBase).toString();
}
}
export function toURLSearchParams(params?: Record<string, string | string[]>) {
if (!params) return;
return new URLSearchParams(
Object.entries(params).map(([k, v]) => [
k,
Array.isArray(v) ? v.join(',') : v,
])
);
}