New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(pr): fix broken markdown when version contains '|' #6235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check how this impacts the various platforms we support. If they handle this differently then we may need to move this massaging logic into each platform's markdown massage logic.
This pull request introduces 1 alert when merging 92ce4aa into 61c4fcd - view on LGTM.com new alerts:
|
@rarkins OK. Fair point. I took a look at some of the platforms I know to be supported by Renovate. GitHub: This change should work as-is. Using Gitlab: Exactly like GitHub. BitBucket: It’s impossible to fix this problem, because BitBucket’s flavour of markdown doesn’t support escaping Gitea: no change is required, the formatting worked as it was. CommonMark (0.29): my reading of the spec is that Gitea’s behaviour is correct. No surprises here: the open source project matches the spec, Atlassian’s implementation is, as usual, terrible, and the others are somewhere in between. So... I guess this could be considered a bug in GitHub, Gitlab, and BitBucket, and not in Renovate. It’s still really annoying though. I see that there is some platform-specific code in the |
See here: #3799 (comment) |
Can we fix this using our |
Should be doable, I think bitbucket server is now fixed too, so we can use the escaped variant there too. |
So we default to the "correct" way (that gitea supports) and then massage it to escaped on other platforms? |
@djcsdy @rarkins I want to summarize what needs to be done here.
So what shpould we do here? replacing it in |
@viceice let's leave bitbucket cloud broken for now then, so that we can move forward with the others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test or two though
Yes, escaping is more standard and fixes bitbucket server. Bitbucket cloud is broken with both. Other platforms work before and after. |
From a virus code review, I can't work out what difference this PR makes |
It escapes the pipe in version ranges. See linked or for broken GitHub PR. So this will fix GitHub pr's too |
I try to add a test PR for current state tomorrow, so we can see this pr failing and fix text afterwards. |
@viceice I'm confused because I don't notice any change to the escaping: |
The important part of this PR was this line: https://github.com/renovatebot/renovate/pull/6235/files#diff-464116b52af741627d80e2939c215721L65 But someone has already implemented the equivalent change in master. So this PR is redundant now. |
This comment has been minimized.
This comment has been minimized.
already fixed in #6514 |
Fixes broken markdown in PRs caused by version ranges containing
|
.For an example of what I mean, see this PR: softwareventures/tslint-rules#25
Notice that the table markup is broken because the target version range is
^1.9.3 || ^2.0.0
, and|
is interpreted by markdown as a table cell delimiter.Closes #5397