]> git.p6c8.net - pcdenotes.git/commitdiff
Enabled fenced code in Markdown module and added CSS for this
authorPatrick Canterino <patrick@patrick-canterino.de>
Sun, 20 Feb 2022 11:54:22 +0000 (12:54 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sun, 20 Feb 2022 11:54:22 +0000 (12:54 +0100)
notes/static/notes/style.css
notes/templatetags/notes_extras.py

index 02013e4fde1510cea9056db7e65177e59c68a00c..d5ad56c46d29ab07b325b5373d54aff6fac79f5b 100644 (file)
@@ -42,6 +42,11 @@ article blockquote p:last-child {
     margin-bottom: 0;
 }
 
     margin-bottom: 0;
 }
 
+article pre {
+    background: #eeeeee;
+    padding: 0.5em;
+}
+
 footer {
     color: #ffffff;
     background-color: #212529;
 footer {
     color: #ffffff;
     background-color: #212529;
index 81674b8c9aa2931db0dc1badcfa60ff4995bbdc6..2e77f7cea0a4e61148ddadd50399ae940ff55242 100644 (file)
@@ -17,7 +17,7 @@ class EscapeHtml(Extension):
 @register.filter
 @stringfilter
 def markdown(value):
 @register.filter
 @stringfilter
 def markdown(value):
-    return md.markdown(value, extensions=[EscapeHtml(), 'nl2br'])
+    return md.markdown(value, extensions=[EscapeHtml(), 'nl2br', 'fenced_code'])
 
 @register.filter
 def month_name(value):
 
 @register.filter
 def month_name(value):

patrick-canterino.de