executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
708 stars 189 forks source link

Issue on page /syntax/admonitions.html - In example, class should be space separated not comma #902

Closed 72757373656c6c closed 3 months ago

72757373656c6c commented 3 months ago

On the Admonition webpage, in the first section titled "Admonition Types", the example is incorrect.

The text for class is correct, but the example is not. The text says the class is a space separated list, but the example shows a comma separated list.

Text above example and the example

These admonitions take no argument, but may be specified with options:

class:  A space-separated list of CSS classes to add to the admonition. 
name:   A reference target for the admonition (see cross-referencing).

:::{tip}
:class: myclass1,myclass2 
:name: a-tip-reference
Let's give readers a helpful hint!
:::

[Reference to my tip](#a-tip-reference)

HTML Output

Space separated:

<div class="myclass1 myclass2 admonition tip" id="a-tip-reference"

Common separated:

<div class="myclass1-myclass2 admonition tip" id="a-tip-reference">
dbitouze commented 3 months ago

Duplicate of #809?

72757373656c6c commented 3 months ago

You are correct. I searched the issue and reviewed the github code, but missed it. Sorry. I will close.

chrisjsewell commented 3 months ago

Even better, if you want to create a PR to fix it 😄