Repository navigation
[Deepcast] Preserve hyperlinks in translated text - #30271
Conversation
Use DeepL HTML tag handling for clipboard HTML and markdown links so copy and paste keep clickable links.
|
Thank you for your contribution! 🎉 🔔 @mooxl @peter-gy @Popalay @MonsterDeveloper @YamenSharaf @EvanZhouDev @erics118 @riadhrebei @ishassan @shashankxrm @heyFlorentin @ridemountainpig you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/deepcast-preserve-hyperlinks"
FORK_URL="https://github.com/12ian34/extensions.git"
EXTENSION_NAME="deepcast"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryThe PR preserves hyperlinks and rich formatting by carrying clipboard HTML through DeepL’s HTML translation mode and returning rich clipboard content with plain-text display handling.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the current source-selection flow no longer associates clipboard HTML with explicit or selected text merely because their normalized text matches. Important Files Changed
Reviews (4): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
|
I'll make the suggested updates and move from draft within 24 hours :) |
- Remove clipboard HTML matching and normalization logic - Preserve HTML only when clipboard content is the actual source - Prevent selected text from acquiring unrelated rich formatting - Update tests to verify plain text remains unformatted without HTML input
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@12ian34). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
Description
Closes #30120
Deepcast currently sends plain text to DeepL, so copied hyperlinks are dropped. This change:
[docs](https://example.com)to anchorstag_handling: htmlso link targets survive translationPlain text without links is unchanged.
Screencast
N/A. Behaviour change for existing Translate / Translate into … commands.
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfnpm run build,npm run lint, andnpm testall passed. I have not yet imported the distribution build into Raycast.Test plan
npm testinextensions/deepcast(11 passing)npm run lintnpm run buildSee [docs](https://example.com)into Translate and confirm the translated output keeps the URL