Repository navigation
fix(content): links written into GLPI open in a new window (0.6.2) - #41
Merged
Merged
Conversation
Every link to_transport writes now carries target="_blank" rel="noopener noreferrer". GLPI's own editor writes target="_blank" on a link, and without it a link opens in place of the page showing it. Write models render through the same function, so a followup, task, solution or ticket body written through them carries it too. The twin of easyvista-python-client 0.4.2 (baraline/easyvista_python_client#9), which makes the same change after a live measurement on EasyVista's memo view; the two converters keep writing the same HTML. noreferrer is written here too for that reason. 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.6.2 in pyproject.toml, __version__ and all eleven skills; the changelog section; the user guide's writing paragraph. Measured: full suite 1770 passed, 55 skipped, 1 xfailed; mypy and ruff clean. Removing the rewrite fails 6 tests, dropping the title branch fails 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 90 90
Lines 3377 3380 +3
=======================================
+ Hits 3305 3308 +3
Misses 72 72 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…y 9.2 CI on this branch failed "Lint, typing, and docs" with eight `Unused "type: ignore [method-assign]"` errors in _async/_testing.py and _sync/_testing.py, lines this branch does not touch. The cause is tenacity 9.2.1 (CI had 9.1.4 on 2026-10-03, when main was green, with the same mypy 2.4.0): its retry decorator is typed differently, so mypy no longer sees the retried _get_request/_post_request/_update_request/_delete_request as methods, and the method-assign code is unused. main fails the same way today. The four assignments now list unused-ignore beside their codes, which is mypy's way to mark an ignore as version-dependent: still needed on tenacity 9.1.x, unused on 9.2.x. _async edited, _sync regenerated by unasync_build.py. Measured: mypy clean with tenacity 9.1.4 and with 9.2.1; full suite 1770 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
GlpiContentConverter.to_transportwrites now carriestarget="_blank" rel="noopener noreferrer". Patch release 0.6.2; reading is unchanged.The twin of easyvista_python_client#9 (0.4.2), so the two converters keep writing the same HTML.
Why
GLPI's own editor writes
target="_blank"on a link. Without it, a link opens in place of the page showing it. On the EasyVista side, a live measurement (2026-10-07) showed that only a link carryingtarget="_blank"opened in a new window; bare links opened in place. Both converters render a pivot with the same cmark-gfm call, and a sync between the two ITSMs relies on them rendering alike, so the change is made in both.noreferreris written here too for that reason.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. Write models render through the same function, so a followup, task, solution or ticket body written through them carries the attributes too.targetandrel, sofrom_transport(to_transport(m))is unchanged for every link (new round-trip tests).__version__and all eleven skills, the CHANGELOG section, and the user guide's writing paragraph.Test plan
titlebranch fails 1🤖 Generated with Claude Code