Skip to content

Commit

Permalink
feat: add pre/clode language-xxx class to code blocks (#97)
Browse files Browse the repository at this point in the history
* feat: add pre/clode language-xxx class to code blocks

* chore: update CHANGELOG

* chore: update markdown-clj
  • Loading branch information
BerkeleyTrue authored Mar 16, 2024
1 parent aab2085 commit caffe69
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ classes
/templates/
/posts/
.cache
.clj-kondo
.nrepl-port
.direnv
.envrc
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Instances of quickblog can be seen here:
- Add `--date` to api/new. ([@jmglov](https://github.com/jmglov))
- Support Selmer template for new posts in api/new; see [Templates > New
posts](README.md#new-posts) in README. ([@jmglov](https://github.com/jmglov))
- Add 'language-xxx' to pre/code blocks

## 0.3.6 (2031-12-31)

Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/data.xml {:mvn/version "0.2.0-alpha6"}
selmer/selmer {:mvn/version "1.12.53"}
markdown-clj/markdown-clj {:mvn/version "1.11.7"}
markdown-clj/markdown-clj {:mvn/version "1.12.0"}
org.babashka/cli {:mvn/version "0.6.50"}
org.babashka/http-server {:mvn/version "0.1.11"}
babashka/babashka.pods {:git/url "https://github.com/babashka/pods"
Expand Down
5 changes: 4 additions & 1 deletion src/quickblog/internal.clj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@
:footnotes? true
:code-style
(fn [lang]
(format "class=\"lang-%s\"" lang)))
(format "class=\"lang-%s language-%s\"" lang lang))
:pre-style
(fn [lang]
(format "class=\"language-%s\"" lang)))
:html
post-process-markdown)))

Expand Down

0 comments on commit caffe69

Please sign in to comment.