summaryrefslogtreecommitdiffstats
path: root/templates/file.md
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-19 20:14:59 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-19 20:14:59 +0200
commit04f8d5f3093e1b13aa704590f4d0bf9dce6afce9 (patch)
tree163392588adcd735a7ab805b24740fdb1120b8ec /templates/file.md
parentcebadfcfbe74a9b892854e860d6d50565dffa7be (diff)
downloadgit2hugo-04f8d5f3093e1b13aa704590f4d0bf9dce6afce9.tar.gz
g2h: Make sure backticks in plaintext doesn't break page rendering
Diffstat (limited to 'templates/file.md')
-rw-r--r--templates/file.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/file.md b/templates/file.md
index e82f1c9..5f4dcbd 100644
--- a/templates/file.md
+++ b/templates/file.md
@@ -6,9 +6,10 @@
{% include '_breadcrumbs.md' %}
{% if type == 'text' %}
-```{{ file_extension }}
+{% set backticks = '`' * backtick_max %}
+{{ backticks }}{{ file_extension }}
{{ content }}
-```
+{{ backticks }}
{% elif type == 'image' %}
![](data:image/png;base64,{{ content }})
{% elif type == 'empty' %}