Fix bare autolink URL visibility in live-preview list items #361
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#361
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bare autolink URLs such as
* http://www.g.comdisappear in live-preview editmode because the rich-editor plugin hides all
URLsyntax tokens, includingstandalone autolinks outside
[label](url)syntax.Problem
In live preview,
tokenHiddenappliescm-formatting-hiddento everyURLnode. Bare external autolinks are entirely represented by that token, so the link
text is removed on inactive lines. Task-link overlay hiding is unrelated and
already scoped to task wikilinks only.
Goal
Keep bare external autolink URLs visible in live preview while continuing to
hide URL destination tokens inside
[label](url)markdown links.Scope
packages/plugins/plugin-markdown/src/lib/codemirror-extensions/rich-editor/index.tsspec/src/30-cross-package-contracts/editor-and-views.mdNon-goals
Acceptance Criteria
* http://www.g.comshow the URL text withexternal-link styling
[Example](https://example.com)still hides the destination URL on inactivelines while keeping the label visible
Implementation Notes
Skip
cm-formatting-hiddenfor bare externalURLnodes whereparent?.name !== "Link"using the same condition as the existingcm-external-linkdecoration pass.Suggested Files or Specs To Inspect
packages/plugins/plugin-markdown/src/lib/codemirror-extensions/rich-editor/index.tspackages/plugins/plugin-markdown/src/styles/live-preview.csspackages/workspace/e2e/markdown-rich-content.spec.tsValidation Commands
pnpm --filter @lapis-notes/plugin-markdown testpnpm --filter @lapis-notes/workspace exec playwright test e2e/markdown-rich-content.spec.ts -g 'bare autolink'pnpm check:allRelated Issues
Follow-up Tasks
Record deferred work or reviewer follow-ups here.
pnpm backlog:startseeds thePR pending-work log from this section.
Branch
Pull Request
Regression Notes
Implementation Summary
Populate when closing the issue.