|
|
@@ -65,6 +65,7 @@ define('SESSION_COOKIE_NAME', 'journal_token');
|
|
65
|
65
|
define('DUPLICATE_POST_SECONDS', 10);
|
|
66
|
66
|
define('TIME_ZONE_DEFAULT', 'America/Los_Angeles');
|
|
67
|
67
|
define('TOKEN_BYTES', 16);
|
|
|
68
|
+define('MARKDOWN_ENABLED', true);
|
|
68
|
69
|
define('SESSION_KEY_ERROR', 'error');
|
|
69
|
70
|
define('SESSION_KEY_LAST_ACCESS', 'last_access');
|
|
70
|
71
|
define('SESSION_KEY_POST_BODY', 'post_body');
|
|
|
@@ -890,7 +891,8 @@ class HTMLPage {
|
|
890
|
891
|
}
|
|
891
|
892
|
|
|
892
|
893
|
public static function render_post(Post $post): void {
|
|
893
|
|
- $body_html = Markdown::markdown_to_html($post->body);
|
|
|
894
|
+ $body_html = MARKDOWN_ENABLED ? Markdown::markdown_to_html($post->body) :
|
|
|
895
|
+ self::post_body_html($post->body);
|
|
894
|
896
|
$date = localized_date_string($post->created);
|
|
895
|
897
|
print(<<<HTML
|
|
896
|
898
|
<div class="post">
|