memos/web/src
boojack 5f7e038aa7 fix(editor): support backslash-escaping literal #tags
Memos layers #tag syntax on top of CommonMark, but there was no way to
write a literal "#NAS" — it always became a clickable tag (issue #6035).

Handle escapes lexically, the way TipTap/prosemirror-markdown do, with no
"escaped tag" node in the document model:

- Parse: marked's built-in backslash escape already turns "\#NAS" into
  plain text; the read-only renderer (remark-tag) now honors the same
  escape by lexing from the original source slice and falling back to the
  prior value-based parse when it can't faithfully reconstruct the text.
- Serialize: a tag-aware Markdown extension (tagMarkdown.ts) backslash-
  escapes a "#" that would re-parse into a tag, skipping links and code
  where tags never form.
- The editor's #tag lexing moves to the canonical @tiptap/markdown
  markdownTokenizer; tag-in-link skipping moves to a tree pass so the
  editor and renderer agree.

The capped tag-run grammar is consolidated into utils/tag-grammar.ts
(TAG_RUN), shared by the tokenizer, the serialize-escape, and the
renderer so they can't drift. README documents why the markdown manager
is worked around in three places.
2026-06-23 23:00:54 +08:00
..
components fix(editor): support backslash-escaping literal #tags 2026-06-23 23:00:54 +08:00
contexts chore: make compact mode an opt-in view setting 2026-06-21 22:55:56 +08:00
helpers feat: redesign account and SSO management (#5886) 2026-04-24 09:08:58 +08:00
hooks feat(filter): standard CEL now variable, time accessors, set ops 2026-06-22 22:42:44 +08:00
layouts refactor(frontend): remove react-use dependency 2026-05-31 18:32:17 +08:00
lib refactor(web): share markdown element styles between viewer and editor 2026-06-13 22:17:00 +08:00
locales feat(storage): add insecure_skip_tls_verify option for S3 2026-06-23 00:04:54 +08:00
pages feat(filter): standard CEL now variable, time accessors, set ops 2026-06-22 22:42:44 +08:00
router feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
themes chore(ui): align frontend on shadcn kit 2026-06-21 09:17:04 +08:00
types feat(storage): add insecure_skip_tls_verify option for S3 2026-06-23 00:04:54 +08:00
utils fix(editor): support backslash-escaping literal #tags 2026-06-23 23:00:54 +08:00
App.tsx fix(instance): add needs_setup so admin-less instances aren't treated as fresh 2026-06-21 22:14:15 +08:00
auth-state.ts fix(auth): recover session via refresh cookie when localStorage is empty (#5748) 2026-03-20 19:21:11 +08:00
connect.ts fix(sse): stream initial response and refresh tokens 2026-05-09 09:15:50 +08:00
i18n.ts feat(i18n): expand European locale coverage 2026-06-09 09:07:28 +08:00
index.css fix(editor): collapse lingering select-all selection after delete 2026-06-15 09:33:16 +08:00
main.tsx perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00