summaryrefslogtreecommitdiff
path: root/src/clarktown/parsers/code_block.clj
diff options
context:
space:
mode:
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>")