summaryrefslogtreecommitdiff
path: root/src/clarktown/parsers/code_block.clj
diff options
context:
space:
mode:
authorAsko Nomm <asko@bien.ee>2022-04-05 01:38:03 +0200
committerAsko Nomm <asko@bien.ee>2022-04-05 01:38:03 +0200
commit3770175783d53f9008d81dca8b19741b218d925f (patch)
treeb56482908485599d23afde3de3a91340eb96fb0a /src/clarktown/parsers/code_block.clj
parenta17bb85a5a7170efc92f110d11cff1cef43e92b2 (diff)
bump
Diffstat (limited to 'src/clarktown/parsers/code_block.clj')
-rw-r--r--src/clarktown/parsers/code_block.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clarktown/parsers/code_block.clj b/src/clarktown/parsers/code_block.clj
index 9d41ae7..b1699d7 100644
--- a/src/clarktown/parsers/code_block.clj
+++ b/src/clarktown/parsers/code_block.clj
@@ -4,7 +4,7 @@
(defn is?
- "Determines whether or not we're dealing with a code block."
+ "Determines whether we're dealing with a code block."
[block]
(and (string/starts-with? block "```")
(string/ends-with? block "```")))
@@ -23,6 +23,7 @@
(string/replace n #"<" "&lt;")
(string/replace n #">" "&gt;")
(string/replace n #"\n" "<br>")
+ (string/replace n #"\tab" "<tab>")
(string/trim n))]
(if language
(str "<pre class=\"language-" language "\"><code>" code "</code></pre>")