-
Notifications
You must be signed in to change notification settings - Fork 9
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
🐛 FIX: Parsing directive content, when body followed by arguments #28
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
Admonition: | ||
. | ||
```{admonition} This is a **title** | ||
An example of an admonition with custom _title_. | ||
``` | ||
. | ||
<aside class="admonition"> | ||
<header class="admonition-title">This is a <strong>title</strong></header> | ||
<p>An example of an admonition with custom <em>title</em>.</p> | ||
</aside> | ||
. | ||
|
||
Note on split lines: | ||
. | ||
```{note} An example | ||
of an admonition on two lines. | ||
``` | ||
. | ||
<aside class="admonition note"> | ||
<header class="admonition-title">Note</header> | ||
<p>An example | ||
of an admonition on two lines.</p> | ||
</aside> | ||
. | ||
|
||
[FIX] Note on a single line [See #154](https://github.com/executablebooks/MyST-Parser/issues/154) | ||
. | ||
```{danger} An example of an admonition on a single line. | ||
``` | ||
. | ||
<aside class="admonition danger"> | ||
<header class="admonition-title">Danger</header> | ||
<p>An example of an admonition on a single line.</p> | ||
</aside> | ||
. | ||
|
||
Admonition with overridding class name | ||
. | ||
```{admonition} This is a title | ||
:class: tip | ||
An example of a `tip` with a custom _title_. | ||
``` | ||
. | ||
<aside class="tip admonition"> | ||
<header class="admonition-title">This is a title</header> | ||
<p>An example of a <code>tip</code> with a custom <em>title</em>.</p> | ||
</aside> | ||
Comment on lines
+39
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these now put the custom class first, as is done in RST. I will make a note of that in the docs I am writing about this. |
||
. | ||
|
||
nested-admonition | ||
. | ||
````{note} This is a note | ||
```{warning} This is a nested warning | ||
``` | ||
```` | ||
. | ||
<aside class="admonition note"> | ||
<header class="admonition-title">Note</header> | ||
<p>This is a note</p> | ||
<aside class="admonition warning"> | ||
<header class="admonition-title">Warning</header> | ||
<p>This is a nested warning</p> | ||
</aside> | ||
</aside> | ||
. | ||
|
||
`attention` admonition: | ||
. | ||
```{attention} | ||
An example of a attention admonition. | ||
``` | ||
. | ||
<aside class="admonition attention"> | ||
<header class="admonition-title">Attention</header> | ||
<p>An example of a attention admonition.</p> | ||
</aside> | ||
. | ||
|
||
`caution` admonition: | ||
. | ||
```{caution} | ||
An example of a caution admonition. | ||
``` | ||
. | ||
<aside class="admonition caution"> | ||
<header class="admonition-title">Caution</header> | ||
<p>An example of a caution admonition.</p> | ||
</aside> | ||
. | ||
|
||
`danger` admonition: | ||
. | ||
```{danger} | ||
An example of a danger admonition. | ||
``` | ||
. | ||
<aside class="admonition danger"> | ||
<header class="admonition-title">Danger</header> | ||
<p>An example of a danger admonition.</p> | ||
</aside> | ||
. | ||
|
||
`error` admonition: | ||
. | ||
```{error} | ||
An example of an error admonition. | ||
``` | ||
. | ||
<aside class="admonition error"> | ||
<header class="admonition-title">Error</header> | ||
<p>An example of an error admonition.</p> | ||
</aside> | ||
. | ||
|
||
`hint` admonition: | ||
. | ||
```{hint} | ||
An example of a hint admonition. | ||
``` | ||
. | ||
<aside class="admonition hint"> | ||
<header class="admonition-title">Hint</header> | ||
<p>An example of a hint admonition.</p> | ||
</aside> | ||
. | ||
|
||
`important` admonition: | ||
. | ||
```{important} | ||
An example of an important admonition. | ||
``` | ||
. | ||
<aside class="admonition important"> | ||
<header class="admonition-title">Important</header> | ||
<p>An example of an important admonition.</p> | ||
</aside> | ||
. | ||
|
||
`note` admonition: | ||
. | ||
```{note} | ||
An example of a note admonition. | ||
``` | ||
. | ||
<aside class="admonition note"> | ||
<header class="admonition-title">Note</header> | ||
<p>An example of a note admonition.</p> | ||
</aside> | ||
. | ||
|
||
`tip` admonition: | ||
. | ||
```{tip} | ||
An example of a tip admonition. | ||
``` | ||
. | ||
<aside class="admonition tip"> | ||
<header class="admonition-title">Tip</header> | ||
<p>An example of a tip admonition.</p> | ||
</aside> | ||
. | ||
|
||
`warning` admonition: | ||
. | ||
```{warning} | ||
An example of a warning admonition. | ||
``` | ||
. | ||
<aside class="admonition warning"> | ||
<header class="admonition-title">Warning</header> | ||
<p>An example of a warning admonition.</p> | ||
</aside> | ||
. | ||
|
||
`see also` admonition: | ||
. | ||
```{seealso} | ||
See other things here! | ||
``` | ||
. | ||
<aside class="admonition seealso"> | ||
<header class="admonition-title">See Also</header> | ||
<p>See other things here!</p> | ||
</aside> | ||
. | ||
|
||
|
||
`see also` admonition with class, bump title | ||
. | ||
```{seealso} Not a title | ||
:class: tip | ||
See other things here! | ||
``` | ||
. | ||
<aside class="tip admonition seealso"> | ||
<header class="admonition-title">See Also</header> | ||
<p>Not a title | ||
See other things here!</p> | ||
</aside> | ||
Comment on lines
+188
to
+199
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the other relevant test case. |
||
. | ||
|
||
|
||
`see also` admonition with class, bump title new paragraph | ||
. | ||
```{seealso} Not a title | ||
:class: tip | ||
|
||
See other things here! | ||
``` | ||
. | ||
<aside class="tip admonition seealso"> | ||
<header class="admonition-title">See Also</header> | ||
<p>Not a title</p> | ||
<p>See other things here!</p> | ||
</aside> | ||
. | ||
Comment on lines
+203
to
+216
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the test shown in the PR conversation that is passing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the change, all other changes are around the tests.