Trim issue titles#88
Merged
zkoppert merged 3 commits intoAug 2, 2023
Merged
Conversation
Trim issue titles to fix Markdown rendering.
It's any whitespace, not just trailing.
Collaborator
|
Thanks for taking the time to submit this pull request!! Appreciate the fix and adding it to the tests. |
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.
Somehow I managed to create a series of issues last month (I assume some weird copy-paste thing) that contained
\rat the end of their titles. For example, this pull request, of which here's a snippet:{ "url": "https://api.github.com/repos/martincostello/update-static-assets/pulls/282", "id": 1454674049, "node_id": "PR_kwDOHxs9d85WtJCB", "html_url": "https://github.com/martincostello/update-static-assets/pull/282", "number": 282, "state": "closed", "title": "Add actionlint\r", // <-- No idea how I managed to do this! "user": { "login": "martincostello" } }This then causes the Markdown table rendering to break (example, notice the PR links starting to appear in the first column).
This pull request fixes that by trimming the issue title before rendering.
It also fixes a test assertion that is failing on my computer even without these changes. As I'm based in London, I assume that makes me equal to UTC here (even though we're currently in Daylight Savings at GMT+1)?