alpha
Login
or
Join now
eagraf.dev
/
textile
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A local-first note taking app
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
textile
/
src
/
editors
/
automerge
/
livePreview
/
at
fix-hr-cursor-offset
11 files
Ethan Graf
Reveal raw --- (no rule) when cursor is on the HR line
11d ago
d2caeb8e
blockquoteDecoration.ts
Reveal raw --- (no rule) when cursor is on the HR line The cm-hr line decoration that draws the rule was applied unconditionally, so placing the cursor on a horizontal rule showed both the rule and the raw "---". Only style the line (and hide its glyphs) when the cursor is on a different line; on the rule's own line, emit nothing so the raw "---" shows for editing — matching how headings/blockquotes reveal their markers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 week ago
codeDecoration.ts
Keep the active line inside an unterminated fenced block Pressing Enter after a code fence left the new line outside the block background until the closing ``` was typed. The per-line loop decremented endLine whenever node.to sat at a line start — but @lezer/markdown only puts node.to at a line start for an *unterminated* block (the newline just typed), never for a closed one (whose node ends on the closing-fence line). So the decrement only ever dropped the active editing line. Remove it: the loop now paints every line the node spans, keeping the cursor's line — and the closing ``` — inside the block, while closed blocks still stop at the fence line and never paint the blank line after. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
context.ts
Hide inline markers as soon as cursor leaves the span Proximity reveal used a 2-char window, so after typing a closing marker (e.g. the second *) the markers stayed visible until the cursor moved 3 characters past them. Set PROXIMITY_CHARS to 0 so markers reveal only while the cursor is within/touching the span and hide the moment it moves one character past the closing marker. Affects bold, italic, strikethrough, inline code, and links. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
headingDecoration.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
hiddenClasses.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
hrDecoration.ts
Reveal raw --- (no rule) when cursor is on the HR line The cm-hr line decoration that draws the rule was applied unconditionally, so placing the cursor on a horizontal rule showed both the rule and the raw "---". Only style the line (and hide its glyphs) when the cursor is on a different line; on the rule's own line, emit nothing so the raw "---" shows for editing — matching how headings/blockquotes reveal their markers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 week ago
index.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
inlineFormatDecoration.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
linkDecoration.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
listDecoration.ts
Complete live-preview rendering for core markdown node types Restructure the Automerge editor's single livePreview.ts into per-node CodeMirror extensions composed by livePreview(), mirroring the reams reference. Extends coverage from 4 node types to the core CommonMark + GFM set (no widgets): - headings: ported as-is - bold / italic / strikethrough: content classes + proximity-revealed markers, registered atomic so cursor motion skips hidden markers - inline code + fenced code blocks: content/line styling + fence hiding - links: fix the broken handler (hide all brackets/paren/URL, style the label) + cmd/ctrl-click to open externally via a new shell.openExternal IPC bridge - blockquotes, horizontal rules, lists: line decorations + prefix hiding Splits the single cm-formatting-hidden class into idiom-correct hide classes (per the CM6 cursor-skip contract) and activates the previously dead CSS. Adds headless builder tests (pure over EditorState) covering each node type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago
livePreview.test.ts
Reveal raw --- (no rule) when cursor is on the HR line The cm-hr line decoration that draws the rule was applied unconditionally, so placing the cursor on a horizontal rule showed both the rule and the raw "---". Only style the line (and hide its glyphs) when the cursor is on a different line; on the rule's own line, emit nothing so the raw "---" shows for editing — matching how headings/blockquotes reveal their markers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 week ago