Skip to content

Commit 1f6c533

Browse files
committed
Defend fenced-clojure-code-block? against NPE
1 parent 086dbfc commit 1f6c533

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/nextjournal/clerk/parser.cljc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359

360360
(defn fenced-clojure-code-block? [{:as block :keys [type info language]}]
361361
(and (code? block)
362+
info
362363
(or (empty? language)
363364
(re-matches #"clj(c?)|clojure" language))
364365
(not (:nextjournal.clerk/code-listing (let [parsed (p/parse-string-all (subs info (count language)))]

0 commit comments

Comments
 (0)