Skip to content

Commit

Permalink
Merge pull request #66 from molgen/more-markdown-settings
Browse files Browse the repository at this point in the history
More markdown settings
  • Loading branch information
donald authored Feb 5, 2020
2 parents b3d52f6 + 455abb1 commit 65d698e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mpicms/base/templatetags/md_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from markdown.extensions.nl2br import Nl2BrExtension
from markdown.extensions.sane_lists import SaneListExtension
from markdown.extensions.smarty import SmartyExtension
from markdown.extensions.admonition import AdmonitionExtension
from markdown.extensions.toc import TocExtension

from django import template
Expand All @@ -19,10 +20,11 @@ def markdown(text):
md_processor = md_module.Markdown(
extensions=[
ExtraExtension(),
CodeHiliteExtension(),
CodeHiliteExtension(guess_lang=False),
Nl2BrExtension(),
SaneListExtension(),
SmartyExtension(smart_angled_quotes=True),
AdmonitionExtension(),
TocExtension(),
]
)
Expand Down
4 changes: 4 additions & 0 deletions mpicms/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -736,3 +736,7 @@ a.tag:hover {
.modal-image:hover, .richtext-image:hover {
cursor: pointer;
}

div.codehilite:not(:last-child) {
margin-bottom: 1em;
}
9 changes: 9 additions & 0 deletions mpicms/templates/wagtailadmin/pages/edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "wagtailadmin/pages/edit.html" %}
{% block extra_css %}
{{ block.super }}
<style>
.fieldname-markdown textarea {
font-family: monospace;
}
</style>
{% endblock %}

0 comments on commit 65d698e

Please sign in to comment.