mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-07 10:16:46 +02:00
Fix. Fix problem wich version package in requirements and add test markdown and rewrite for new markdown
This commit is contained in:
parent
a28569a984
commit
cf5be66fae
@ -50,9 +50,9 @@ def format_time_spent(time_spent):
|
|||||||
|
|
||||||
|
|
||||||
class EscapeHtml(Extension):
|
class EscapeHtml(Extension):
|
||||||
def extendMarkdown(self, md, md_globals):
|
def extendMarkdown(self, md):
|
||||||
del md.preprocessors['html_block']
|
md.preprocessors.deregister('html_block')
|
||||||
del md.inlinePatterns['html']
|
md.inlinePatterns.deregister('html')
|
||||||
|
|
||||||
|
|
||||||
def get_markdown(text):
|
def get_markdown(text):
|
||||||
|
@ -20,14 +20,14 @@ class MarkDown(SimpleTestCase):
|
|||||||
self.assertEqual(output_value, expected_value)
|
self.assertEqual(output_value, expected_value)
|
||||||
|
|
||||||
def test_markdown_fenced_code(self):
|
def test_markdown_fenced_code(self):
|
||||||
expected_value = '<h1>Title</h1>\n<pre><code class="python"># import os\n</code></pre>'
|
expected_value = '<h1>Title</h1>\n<pre><code class="language-python"># import os\n</code></pre>'
|
||||||
input_value = """
|
input_value = """
|
||||||
# Title
|
# Title
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# import os
|
# import os
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
output_value = get_markdown(input_value)
|
output_value = get_markdown(input_value)
|
||||||
self.assertEqual(output_value, expected_value)
|
self.assertEqual(output_value, expected_value)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ django-bootstrap4-form
|
|||||||
celery
|
celery
|
||||||
email-reply-parser
|
email-reply-parser
|
||||||
akismet
|
akismet
|
||||||
markdown<3.0
|
markdown
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
lxml
|
lxml
|
||||||
simplejson
|
simplejson
|
||||||
|
Loading…
x
Reference in New Issue
Block a user