Repository navigation
fix(content): links written into a memo open in a new window (0.4.2) - #9
Merged
Merged
Conversation
Every link to_transport writes now carries target="_blank" rel="noopener noreferrer", the shape EasyVista's own editor writes on a link. Without it the memo view opens the link in place, inside EasyVista's window, so a link to another application seemed to do nothing. Measured on a live memo (2026-10-07): three links side by side, bare, with the attributes, and bare inside a paragraph; only the one with target="_blank" opened a new window, and the stored HTML kept the attributes as sent. Reading ignores both attributes, so from_transport(to_transport(m)) is unchanged for every link: plain, titled, autolink and an image inside a link. A link shown as code stays text. The rewrite matches only the anchor shape cmark-gfm writes (href, optional title). Version 0.4.2 in pyproject.toml, __version__, the public-API test and all nine skills; the changelog section and its compare link; docs/content.rst's writing section. Measured: full suite 2145 passed, 96 skipped; mypy and ruff check clean. Removing the rewrite fails 6 tests, dropping the title branch fails 1. (`ruff format --check` lists 14 files on main already, none touched here.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
=======================================
Coverage 98.92% 98.93%
=======================================
Files 40 40
Lines 2614 2617 +3
=======================================
+ Hits 2586 2589 +3
Misses 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
3 tasks done
Owner
Author
|
Twin opened: baraline/glpi_python_client#41 (0.6.2) makes the same change, so both converters keep writing the same HTML. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every link
EasyvistaContentConverter.to_transportwrites now carriestarget="_blank" rel="noopener noreferrer", the shape EasyVista's own editor writes on a link. Patch release 0.4.2; reading is unchanged.Why
EasyVista's memo view opens a link without
target="_blank"in place, inside EasyVista's own window, so a link to another application appeared to do nothing. Measured on a live memo (2026-10-07), with three links side by side:<a href="…"><a href="…" target="_blank" rel="noopener noreferrer"><p>… <a href="…"></p>The memo kept the attributes exactly as sent. A link typed in EasyVista's editor is stored with
target="_blank" rel="noopener noreferrer". A pasted one (data-fr-linked, Froala) is stored without them, and it opens in place too.What changes
markdown_to_htmladds the two attributes to each anchor cmark-gfm writes:href, plus an optionaltitle. That covers plain, titled, autolink and image-inside-a-link links. A link shown as code stays text.targetandrel, sofrom_transport(to_transport(m))is unchanged for every link (new round-trip tests).__version__, the public-API test, all nine skills, CHANGELOG and its compare link, anddocs/content.rst's writing section.Twin
glpi_python_clientrenders with the same cmark-gfm call, and its reader is this package's twin. A matching change is being prepared there (0.6.2) so the two keep writing the same HTML. GLPI's own editor also stores links withtarget="_blank".Test plan
mypy easyvista_python_clientandruff check .cleantitlebranch fails 1ruff format --checkreports 14 files that already differ onmain, none touched here🤖 Generated with Claude Code