You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without it the gesture only runs one way. A reference can be broken but not made, so an author who removes one cannot put it back except by editing the file outside Leafdown.
Typing the closing ; of a valid reference converts the run: the document holds the character the reference names, carrying the typed source, and Project a character reference as its source when the caret reaches it #298's projection is open over it. The visible characters do not change and the caret stays where the author left it, as for any commit under an open projection. The run restyling to marker colour is the signal that the conversion happened.
The trigger does not fire where a reference cannot form or is not the run's owner: inside inline code, inside an open link or marked-fragment projection, or across a mark boundary, so &co**py;** stays as written.
Documentation, decisions, or prior investigation: docs/specification.md Inline Content, and docs/decisions.md under Offer the escape gesture only where the conversion exists.
#255 is the precedent, not #270. #270 closed Not proceeding: the caret-leave commit and its record both stayed, because the narrowed rule cost the Link and Image commands their only conversion path. What carries here is #255's shape, a conversion that completes on the keystroke that causes it and reads as a restyle rather than as moved text.
Every valid reference ends in ;, named, decimal, and hex alike, so one trigger character covers all three forms with no per-form rule.
The conversion adds no second commit clock. The semicolon converts the run and hands it to #298's session, whose exit rule then governs, which is what lets continuing to type revert it with nothing new to keep in step with the serializer.
Summary
Text typed as a character reference stays literal text. An author who types
©gets six characters that save as\©, while the same six characters loaded from a file render as©and save as©. This completes the gesture in the writing direction: typing the semicolon that finishes a valid reference converts the run to the reference it spells, under the projection #298 already opens.Without it the gesture only runs one way. A reference can be broken but not made, so an author who removes one cannot put it back except by editing the file outside Leafdown.
The two input paths also disagree. Plain-text paste parses through
leafdownCharacterReferencewith the pasted text as its source, so a pasted©is expected to arrive already preserved while a typed one does not, which is the divergence #238 was opened over reappearing for a different construct. Confirm the paste path before relying on it; it decides whether this issue changes one path or two.Expected behavior
;of a valid reference converts the run: the document holds the character the reference names, carrying the typed source, and Project a character reference as its source when the caret reaches it #298's projection is open over it. The visible characters do not change and the caret stays where the author left it, as for any commit under an open projection. The run restyling to marker colour is the signal that the conversion happened.xafter the converted run returns©xto literal text and the marker styling drops with it.\©commits literal text, which is how an author keeps the six characters after converting them without reaching forUndo.©,&MadeUpEntity;, and&#;are unchanged by typing, and save with an escape only where a valid reference would otherwise form.&and thencopy;leaves the file holding©, which reopens as the literal text the author wrote. Converting there would write©and reopen as©.&co**py;**stays as written.Undoreturns the typed source in one step, stepping past the semicolon rather than landing on the literal run the semicolon completed. OneUndoonto a state that differs only by marker colour is the silent gesture How a Markdown escape should be represented in the editor #245 blocked Project an escape as its two characters so deleting the backslash converts the run #255 on.Related context
docs/specification.mdInline Content, anddocs/decisions.mdunderOffer the escape gesture only where the conversion exists.Done when
;of a valid reference converts the run and leaves Project a character reference as its source when the caret reaches it #298's projection open with the caret unmoved.\©commits literal text.copy;after a preserved&leaves the file holding©.Undoreturns the typed source.Notes
Implementation direction
The commit point is the semicolon rather than the caret leaving the run, because no caret-leave trigger can be sound here. A file holding
\©opens as literal text©with nothing durable recording the escape, so it is the same document as a freshly typed©, node for node. Caret-leave would convert the run the file deliberately escaped, which is the hole the session-scoped record closes for links and which references neither have nor should grow. A trigger keyed to the keystroke is provenance by construction.#255 is the precedent, not #270. #270 closed
Not proceeding: the caret-leave commit and its record both stayed, because the narrowed rule cost theLinkandImagecommands their only conversion path. What carries here is #255's shape, a conversion that completes on the keystroke that causes it and reads as a restyle rather than as moved text.Every valid reference ends in
;, named, decimal, and hex alike, so one trigger character covers all three forms with no per-form rule.The conversion adds no second commit clock. The semicolon converts the run and hands it to #298's session, whose exit rule then governs, which is what lets continuing to type revert it with nothing new to keep in step with the serializer.
Out of scope