fix: Error on entering a document that doesn't exist
This commit is contained in:
parent
99911d025a
commit
0397f8d2d6
|
@ -70,6 +70,10 @@ pre {
|
|||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.grayed {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
.editor-toolbar {
|
||||
border-top: 0px solid #444;
|
||||
|
|
|
@ -26,9 +26,13 @@
|
|||
<a href="/{{ path }}?edit">Edit</a>
|
||||
{% endif %}
|
||||
|
||||
{% if content is not none %}
|
||||
{% autoescape false %}
|
||||
{{ markdown(content, extensions=['extra']) }}
|
||||
{% endautoescape %}
|
||||
{% else %}
|
||||
<p class="grayed">This document doesn't exist</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<form method="POST" action="/{{ path }}">
|
||||
<textarea id="markdown-textarea" name="text">{{ content }}</textarea>
|
||||
|
|
Loading…
Reference in New Issue