Commit 23f48b37 by benjaoming

Merge pull request #102 from SacNaturalFoods/master

fixed help plugin TOC syntax and added Tables section
parents 31562fdc 0f02092a
......@@ -14,6 +14,7 @@ WIKI_LANGUAGE = 'markdown'
EDITOR = getattr( django_settings, 'WIKI_EDITOR', 'wiki.editors.markitup.MarkItUp' )
MARKDOWN_EXTENSIONS = getattr( django_settings, 'WIKI_MARKDOWN_EXTENSIONS', ['extra', 'toc'] )
MARKDOWN_SAFE_MODE = getattr( django_settings, 'WIKI_MARKDOWN_SAFE_MODE', 'remove' )
# This slug is used in URLPath if an article has been deleted. The children of the
# URLPath of that article are moved to lost and found. They keep their permissions
......
import markdown
from wiki.conf import settings
class ArticleMarkdown(markdown.Markdown):
def __init__(self, article, *args, **kwargs):
kwargs['safe_mode'] = "remove"
kwargs['safe_mode'] = settings.MARKDOWN_SAFE_MODE
markdown.Markdown.__init__(self, *args, **kwargs)
self.article = article
......
......@@ -19,7 +19,7 @@ Huger header
### Huge header
#### Small header
[[ TOC ]]
[TOC]
</pre>
<h4>{% trans "Typography" %}</h4>
......@@ -34,3 +34,12 @@ Huger header
- Sub Item 2</pre>
<pre>1. Ordered
2. List</pre>
<h4>{% trans "Tables" %}</h4>
<pre>
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
</pre>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment