feat(panel): close with Esc without a click and render Markdown
Esc: make the panel key when shown (closeWithEscape, default on) without activating the app; the source app stays frontmost and Replace still targets it. Handle Esc with SwiftUI's exit command, which also works from the popover and after clicking controls. Add TranslationPanel.canBecomeKey and amend ADR-009.\n\nMarkdown: add MarkdownPresentation in SprachmittlerText (Foundation inline parser plus a conservative block parser for headings, lists, quotes, fenced code and rules), a SwiftUI MarkdownTranslationView, and a renderMarkdown setting (default on). JSON, HTML and code sources are never rendered; only http/https links open; images become alt text; Copy and Replace keep the raw Markdown (ADR-021).\n\nVerified: make verify green; synthetic Esc closes the panel and closes an open language popover first; a live Markdown translation rendered heading, bold/italic, inline code, list, quote, code block and link; Copy returned the raw Markdown; Replace still changed the TextEdit selection with the panel key.
This commit is contained in:
1 parent
d126124f97
commit
a3e544fbe4
22 files changed
+1072
-250
No files matched your search
@@ -62,7 +62,7 @@ Do not substitute tokens with sentinels in v1: sentinels can leak into the outpu
|
||||
| T3 | No spelling, grammar, style, terminology or punctuation edits. No de-duplication. No "cleanup" of model wording. | always |
|
||||
| T4 | Do not strip a preamble or explanation. Detect it, warn, keep the raw text, disable Replace by default. | always |
|
||||
|
||||
The panel shows the T1 output. There is no hidden rewrite. If the model returns a preamble, the user sees it.
|
||||
The panel shows the T1 output. There is no hidden rewrite. If the model returns a preamble, the user sees it. Markdown rendering in the panel is presentation only: validation, Copy and Replace all use the raw T1 string, including its Markdown markers. See ADR-021.
|
||||
|
||||
## 6. Preamble detection
|
||||
|
||||
|
||||
Reference in new issue
Block a user