Skip to content
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

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

Closed
72757373656c6c opened this issue Apr 7, 2024 · 3 comments

Comments

@72757373656c6c
Copy link
Contributor

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
Copy link

dbitouze commented Apr 7, 2024

Duplicate of #809?

@72757373656c6c
Copy link
Contributor Author

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

@chrisjsewell
Copy link
Member

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

72757373656c6c pushed a commit to 72757373656c6c/MyST-Parser that referenced this issue Apr 10, 2024
Correct admonition example to match class option definition
which is a space-separated list.

Add a link to the class option definition for identifier
normalization rules.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#identifier-normalization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants