scop / bash-completion

Programmable completion functions for bash
GNU General Public License v2.0
2.95k stars 382 forks source link

Github errors parsing changelog in CHANGELOG.md and release 2.12.0 #1272

Open yedayak opened 5 days ago

yedayak commented 5 days ago

Describe the bug

First mentioned in https://github.com/scop/bash-completion/issues/1179 When looking at release 2.12.0, there are errors rendering a few of the lines:

 Extra open brace or missing close brace 

image

The issue is that github interprets anything between two dollar signs ($) as a LaTeX expression, parsed with MathJax. The 4 lines that create the error all have a single opening brace between two dollar signs, for example:

CHANGELOG.md:* **dict:** work around bash-4.3 ${v+"$@"} with custom IFS ([cc21298](https://github.com/scop/bash-completion/commit/cc212983a2b2523e5b62e9735c6dff5f011bb80a))

Just ${$ (unquoted) is enough to trigger this. I will create a PR to quote these in the changelog. I don't know if editing the release itself will change the date on it? Do you think it's worth creating some kind of lint to catch stuff like that or filing an issue with release please?

To reproduce

Look at the bug fixes in CHANGELOG.md in the 2.12.0 section

Expected behavior

No errors when rendering

Versions (please complete the following information)

N/A

akinomyoga commented 5 days ago

I don't know if editing the release itself will change the date on it?

I don't think it will. I'm not familiar with it, but release-please seems to just insert a section on the release time.

Do you think it's worth creating some kind of lint to catch stuff like that or filing an issue with release please?

We may need to add a rule for the commit message so that $ is only allowed in `...`.

We might file an issue in the upstream release-please, but I'm not sure how it should behave in the general case. For the bash-completion project, we still expect `...` in the commit messages to be treated as Markdown. Likewise, some projects may want to include LaTeX formulae in the commit messages, so we cannot simply escape all the special characters of Markdown. Maybe they can allow configuring the set of characters that should be escaped?