sympy-bot
sympy-bot copied to clipboard
Uniform second level list marking
I just edited the release notes a bit and noted that some "second level lists" were using -
and some *
. I manually edited all to use *
, but it would be nice if the bot could either check for the preferred format or change it to a unified format.
The difference seems to be that there is no additional spacing between the items when using -
, so maybe that is actually preferred. The Wiki page states *
, but some frequent contributors seems to use -
.
I do not have any strong opinions on which should be used, but for consistency it should be one of them.
I also noted a bit of inconsistency when it comes to starting entries with capital letters. Maybe not worth checking for, but worth considering if one should update the Wiki page example to use capital letters (and possibly add an example with backticks for a method name). Or we just say that it doesn't matter or that it should not start with a capital letter.
I made it use either, because both produce the same kind of bullet in Markdown. We could normalize it to one or the other for the wiki.
For capital letters, ideally the entries should be complete sentences, so begin with a capital letter (unless the first word is a code
item), and end with a period. But it isn't enforced by the bot.
The difference seems to be that there is no additional spacing between the items when using -, so maybe that is actually preferred. The Wiki page states *, but some frequent contributors seems to use -.
Is that true?
-
-
bullet- sub
-
bullet - sub
-
bullet
- sub
-
*
bullet- sub
*
bullet - sub
*
bullet
- sub
They seem to be the same at least for GitHub comments. As far as I know -
, *
, and +
all produce the same HTML (<li>
elements).
Good question. It indeed looked like that in the release notes, but I cannot say I see any difference here. Didn't check the HTML either.
OK! I'll update the Wiki when I remember so that the examples are complete sentences. May help a bit.
It seems like -
gives a paragraph environment <p>...</p>
, except for the first bullet (or if it is after a *
. Check out e.g. the printing section in https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5
<li>
<p>printing</p>
<ul>
<li>Added support for <code>HadamardPower</code> in latex printer. (<a href="https://github.com/sympy/sympy/pull/16474">#16474</a> by <a href="https://github.com/sylee957">@sylee957</a> and <a href="https://github.com/Upabjojr">@Upabjojr</a>)</li>
</ul>
<ul>
<li>Fixed alignment of expressions inside sums in pretty printer (<a href="https://github.com/sympy/sympy/pull/16503">#16503</a> by <a href="https://github.com/anpandey">@anpandey</a>)</li>
</ul>
<ul>
<li>
<p>Add support for <code>HadamardProduct</code> in mathml presentation printer. (<a href="https://github.com/sympy/sympy/pull/16483">#16483</a> by <a href="https://github.com/sylee957">@sylee957</a>)</p>
</li>
<li>
<p>pretty printing of BaseScalar and BaseVector matches the latex form with CoordSys as subscript (<a href="https://github.com/sympy/sympy/pull/16422">#16422</a> by <a href="https://github.com/kangzhiq">@kangzhiq</a> and <a href="https://github.com/smichr">@smichr</a>)</p>
</li>
</ul>
</li>
from
* printing
- Added support for `HadamardPower` in latex printer. ([#16474](https://github.com/sympy/sympy/pull/16474) by [@sylee957](https://github.com/sylee957) and [@Upabjojr](https://github.com/Upabjojr))
* Fixed alignment of expressions inside sums in pretty printer ([#16503](https://github.com/sympy/sympy/pull/16503) by [@anpandey](https://github.com/anpandey))
- Add support for `HadamardProduct` in mathml presentation printer. ([#16483](https://github.com/sympy/sympy/pull/16483) by [@sylee957](https://github.com/sylee957))
- pretty printing of BaseScalar and BaseVector matches the latex form with CoordSys as subscript ([#16422](https://github.com/sympy/sympy/pull/16422) by [@kangzhiq](https://github.com/kangzhiq) and [@smichr](https://github.com/smichr))
Interesting. I don't see anything in the commonmark spec about mixing bullet types. Although I don't know if the GitHub wikis use string commonmark. The spec seems to imply that
is used whenever there is a blank line between the items.
In the printing section of the 1.5 notes, there is clearly more vertical space after the second bullet. So maybe it is worth changing this.
Let's modify what the bot produces instead of forcing people to use a certain bullet type. The bot collects list items so the first character should always be -
, *
, or +
, so we can easily canonicalize it.