aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-12 09:47:17 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-12 09:47:17 -0500
commitd35e73be19e00e8897c4c6acff5b5506b7235ae5 (patch)
tree6af3d5c9cc6f633163816d2fb572ee53b36fd6f5
parente04deb5210fb121ae30999da1d32285b9d7c8406 (diff)
downloadmarkdown-d35e73be19e00e8897c4c6acff5b5506b7235ae5.tar.gz
markdown-d35e73be19e00e8897c4c6acff5b5506b7235ae5.tar.bz2
markdown-d35e73be19e00e8897c4c6acff5b5506b7235ae5.zip
Allow capitalized Admonition title.
If an adminition title is capitalized, the html class on the div should still be lowercased.
-rw-r--r--markdown/extensions/admonition.py2
-rw-r--r--tests/extensions/admonition.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py
index 798befb..122eb87 100644
--- a/markdown/extensions/admonition.py
+++ b/markdown/extensions/admonition.py
@@ -101,7 +101,7 @@ class AdmonitionProcessor(markdown.blockprocessors.BlockProcessor):
blocks.insert(0, theRest)
def get_class_and_title(self, match):
- klass, title = match.group(1), match.group(2)
+ klass, title = match.group(1).lower(), match.group(2)
if title is None:
# no title was provided, use the capitalized classname as title
# e.g.: `!!! note` will render `<p class="admonition-title">Note</p>`
diff --git a/tests/extensions/admonition.txt b/tests/extensions/admonition.txt
index fd18bd6..b6c815c 100644
--- a/tests/extensions/admonition.txt
+++ b/tests/extensions/admonition.txt
@@ -16,7 +16,7 @@ Some text
More text and stuff.
-!!! note "Did you know?"
+!!! Note "Did you know?"
You can customize the title of the admonition
!!! mycustomcssclass "And now..."