Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore(web): bump @usememos/editor to 26.10.16

johnnyjoyghb736c0202c35
diff --git a/web/package.json b/web/package.json
index 29325d0ee..e71284501 100644
--- a/web/package.json
+++ b/web/package.json
@@ -25,7 +25,7 @@
"@tailwindcss/vite": "^4.2.4",
"@tanstack/react-query": "^5.100.9",
"@tanstack/react-query-devtools": "^5.100.9",
- "@usememos/editor": "26.10.15",
+ "@usememos/editor": "26.10.16",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"copy-to-clipboard": "^4.0.2",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 8d3fef515..acbde7baa 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -36,8 +36,8 @@ importers:
specifier: ^5.100.9
'@usememos/editor':
- specifier: 26.10.15
+ specifier: 26.10.16
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -1135,8 +1135,8 @@ packages:
'@upsetjs/[email protected]':
resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==}
- '@usememos/[email protected]':
- resolution: {integrity: sha512-DW8kdAiOGiNkllK2PURgiYW3/j+Qb7DPCZDOGtIZTn4K0rwr0fP0odUKj7BWzRM+5x288LLz74BCV/ZdAQRYnA==}
+ '@usememos/[email protected]':
+ resolution: {integrity: sha512-o8C4gObGaKT1rV0z6zzigreQSpSjB/NQuGyicm+pUsICKyjyXPPH8OmDecW44X3l6pv157MsFxWm4IXafSblvw==}
peerDependencies:
react: '>=18'
react-dom: '>=18'
@@ -3262,7 +3262,7 @@ snapshots:
d3-selection: 3.0.0
d3-transition: 3.0.1([email protected])
optionalDependencies:
react: 19.2.6
react-dom: 19.2.6([email protected])
diff --git a/web/src/components/MemoContent/enhance.ts b/web/src/components/MemoContent/enhance.ts
index 2814ab279..ee8aefafa 100644
--- a/web/src/components/MemoContent/enhance.ts
+++ b/web/src/components/MemoContent/enhance.ts
@@ -21,7 +21,8 @@ function bareLinkOf(block: Block): string | undefined {
const href = block.content[0].link;
// Only web links have metadata to preview; `tel:`/`sms:`/`mailto:` hand off to another app.
if (!href || !/^https?:\/\//i.test(href)) return undefined;
- if (!block.content.every((span) => span.link === href && !span.image)) return undefined;
+ // A titled link is a written `[text](url "title")`, never a bare URL; a card would drop its title.
+ if (!block.content.every((span) => span.link === href && !span.linkTitle && !span.image)) return undefined;
return inlineText(block.content) === href ? href : undefined;
}
diff --git a/web/tests/editor-tag-autocomplete.test.ts b/web/tests/editor-tag-autocomplete.test.ts
index 85481bfa7..f6405a517 100644
--- a/web/tests/editor-tag-autocomplete.test.ts
+++ b/web/tests/editor-tag-autocomplete.test.ts
@@ -11,11 +11,21 @@ const allowContext = (overrides: Partial<SuggestionAllowContext>): SuggestionAll
({ excluded: false, explicit: false, query: "", textBefore: "", from: 0, ...overrides }) as SuggestionAllowContext;
describe("tag suggestion matching", () => {
- it.each(["hello #", "#t", "- [ ] #", "#work/", "first line\n#work/"])("finds a tag token being typed: %s", (text) => {
+ it.each([
+ "hello #",
+ "#t",
+ "- [ ] #",
+ "#work/",
+ "first line\n#work/",
+ "hello#work",
+ "C#",
+ "#2024",
+ "#t",
+ ])("finds a tag token being typed: %s", (text) => {
expect(tokenAtEnd(text)).not.toBeNull();
});
- it.each(["", "hello world", "C#", "hello#work", "#work//"])("finds no tag token in %s", (text) => {
+ it.each(["", "hello world", "#work//"])("finds no tag token in %s", (text) => {
expect(tokenAtEnd(text)).toBeNull();
});
});