Comment by 🕹️ skyjake

Re: "Syntax Highlighting in Code Blocks"

In: s/Lagrange

When it comes to the copy-paste issue, it would be pretty trivial for me to strip all ANSI formatting when copying text to the clipboard. Maybe I’ll make that a context menu action or something.

Another improvement would be to allow configuring filter hooks more granularly, for example only for preformatted blocks, leaving the rest of the page source unmodified.

🕹️ skyjake [mod, sysop]

Jul 21 · 3 months ago

1 Later Comment

🍀 gritty · Jul 21 at 17:01:

this would go well with a pastebin-style capsule that I think gemini could use

Original Post

🌒 s/Lagrange

Syntax Highlighting in Code Blocks — /u/cthulhu/image/324.png Syntax Highlighting (png, ~82 Kb) DISCLAIMER. Do not do this! It's impossible to copy-paste highlighted text, tons of the ANSI-escapes will be on your conscience! We'll use Lagrange MIME-hooks and Python script with "rich" and "pygments" modules. [gemini link] Lagrange (git.skyjake.fi) Hooks are configured using the file "mimehooks.txt" in Lagrange's config directory. Each hook has a regexp that is matched against the response MIME...

Link

💬 cthulhu · 2 comments · 3 likes · Jul 21 · 3 months ago


Source