aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extensions
diff options
context:
space:
mode:
authorWhiteWinterWolf <github@whitewinterwolf.com>2017-09-08 13:45:19 +0200
committerWaylan Limberg <waylan.limberg@icloud.com>2018-07-24 14:42:42 -0400
commit67bb12b3e508b389f18efb6a992cc390680a7235 (patch)
treef9d45a6eee6e9f93d8ebab8bb20991deb05fec16 /tests/extensions
parentd7764996e4e08faefaf3564fa71c19751847b55f (diff)
downloadmarkdown-67bb12b3e508b389f18efb6a992cc390680a7235.tar.gz
markdown-67bb12b3e508b389f18efb6a992cc390680a7235.tar.bz2
markdown-67bb12b3e508b389f18efb6a992cc390680a7235.zip
Add the possibility to set additional classes
Additional CSS classes names can be appended to the admonition name using spaces as separators. The following markdown: !!! note floatright This is a floating note. Generates the following HTML code: <div class="admonition note floatright"> <p class="admonition-title">Note</p> <p>This is a floating note.</p> </div>
Diffstat (limited to 'tests/extensions')
-rw-r--r--tests/extensions/admonition.html9
-rw-r--r--tests/extensions/admonition.txt8
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/extensions/admonition.html b/tests/extensions/admonition.html
index 511d71a..8812dcb 100644
--- a/tests/extensions/admonition.html
+++ b/tests/extensions/admonition.html
@@ -26,6 +26,15 @@
<p>For something completely different.</p>
<p>You can also use a custom CSS class name.</p>
</div>
+<div class="admonition class1 class2 class3">
+<p class="admonition-title">And now...</p>
+<p>For something completely different.</p>
+<p>Several class names can be separated by space chars.</p>
+</div>
+<div class="admonition note anotherclass">
+<p class="admonition-title">Note</p>
+<p>The default title is the capitalized first class name.</p>
+</div>
<div class="admonition tip">
<p>An explicitly empty string prevents the title from being rendered.</p>
</div>
diff --git a/tests/extensions/admonition.txt b/tests/extensions/admonition.txt
index ab8434c..03ff4e9 100644
--- a/tests/extensions/admonition.txt
+++ b/tests/extensions/admonition.txt
@@ -25,6 +25,14 @@ Not part of an Admonition!
You can also use a custom CSS class name.
+!!! class1 class2 class3 "And now..."
+ For something completely different.
+
+ Several class names can be separated by space chars.
+
+!!! note anotherclass
+ The default title is the capitalized first class name.
+
!!! tip ""
An explicitly empty string prevents the title from being rendered.