fix(jira): stop prose plus signs corrupting markdown read-back - #1615
Open
barrygfox wants to merge 2 commits into
Open
fix(jira): stop prose plus signs corrupting markdown read-back#1615barrygfox wants to merge 2 commits into
barrygfox wants to merge 2 commits into
Conversation
Unpaired plus signs in prose (version numbers like 3.13+) were paired by the inserted-text rule into an <ins> span spanning whole paragraphs. The resulting HTML tag then triggered _convert_html_to_markdown, which pushed the entire document through markdownify and escaped every markdown emphasis delimiter in the response (rendered as \*\* in tool output) while dropping the plus signs. - inserted-text delimiters glued to word characters are now treated as prose, matching how Jira itself renders intraword pluses - _convert_html_to_markdown only engages when the source text contained HTML, never merely because our own converter emitted a tag - smart-link URLs keep literal plus signs; only display titles get them replaced with spaces
Reported-by: barrygfox
barrygfox
force-pushed
the
pr/prose-plus-readback
branch
from
August 25, 2026 02:38
f1bc557 to
1864655
Compare
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.
Problem
Unpaired plus signs in Jira prose, especially version numbers such as
Python 3.13+andurllib3 2.6+, could be paired across text by the inserted-text rule. That emitted an<ins>tag, triggered whole-document HTML conversion, escaped existing Markdown characters, and removed the plus signs from read responses.The HTML guard also checked content only after
jira_to_markdown(). Converter-generated tags therefore still looked like source HTML, so the guard did not prevent the second conversion.Solution
(?<!\w)\+([^+\n]+)\+(?!\w).clean_jira_text()records whether the original Jira source contains HTML outside protected code spans before Jira markup conversion.Changes
src/mcp_atlassian/preprocessing/jira.py<ins>,<cite>,<sup>, and<sub>tags from triggering a second conversion.tests/unit/preprocessing/test_preprocessing.pyVerification
uv run pytest tests/unit/preprocessing/ -q: 175 passeduv run pytest tests/unit/ -q: 3842 passed, 5 repository-standard skipsuv run pytest 'tests/e2e/test_jira_auth_matrix.py::TestJiraReadOperations::test_get_issue[basic]' --dc-e2e -vv: 1 passed, no skipsuv run python scripts/generate_tool_docs.py --check: passedA broader DC run reached 102 passed, 1 failed, and 1 skipped. The failure is an unrelated JSM fixture problem: the pre-seeded
JSMDC-2issue returns 403 from the service-desk comment endpoint.Related: #1610