aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-05-14 23:13:18 -0400
committerWaylan Limberg <waylan@gmail.com>2008-05-14 23:13:18 -0400
commita91e308363eeacd77270cdcb3df2109e0cfe2d18 (patch)
tree822ca36517a1c59b95c703eb8dad3075045764dd /markdown.py
parentc0c88a2777a1641d4312b6aafe454f466fe104b2 (diff)
downloadmarkdown-a91e308363eeacd77270cdcb3df2109e0cfe2d18.tar.gz
markdown-a91e308363eeacd77270cdcb3df2109e0cfe2d18.tar.bz2
markdown-a91e308363eeacd77270cdcb3df2109e0cfe2d18.zip
Allow hashes (#) in body of headers -- with tests. Thank you John Szakmeister for the bug report and patch.
Diffstat (limited to 'markdown.py')
-rw-r--r--markdown.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown.py b/markdown.py
index acab09a..3348acc 100644
--- a/markdown.py
+++ b/markdown.py
@@ -1295,7 +1295,7 @@ class CorePatterns:
"""
patterns = {
- 'header': r'(#*)([^#]*)(#*)', # # A title
+ 'header': r'(#{1,6})[ \t]*(.*?)[ \t]*(#*)', # # A title
'reference-def': r'(\ ?\ ?\ ?)\[([^\]]*)\]:\s*([^ ]*)(.*)',
# [Google]: http://www.google.com/
'containsline': r'([-]*)$|^([=]*)', # -----, =====, etc.