Skip to content

Commit

Permalink
Edn support (#3213)
Browse files Browse the repository at this point in the history
* Add edn to clojure aliases
* Add clojure markup test specifically for edn alias
* Add clojure alias to changelog
  • Loading branch information
stelcodes committed Jun 2, 2021
1 parent 45bb607 commit 5d51ee4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGES.md
@@ -1,3 +1,12 @@
## Version 11.1.0 (pending)

Grammars:

- enh(clojure) added `edn` alias (#3213) [Stel Abrego][]

[Stel Abrego]: https://github.com/stelcodes


## Version 11.0.0

**This is a major release.** As such it contains breaking changes which may require action from users. Please read [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md) for a detailed summary of all breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion src/languages/clojure.js
Expand Up @@ -143,7 +143,7 @@ export default function(hljs) {

return {
name: 'Clojure',
aliases: [ 'clj' ],
aliases: [ 'clj', 'edn' ],
illegal: /\S/,
contains: [
LIST,
Expand Down
14 changes: 14 additions & 0 deletions test/markup/clojure/deps_edn.expect.txt
@@ -0,0 +1,14 @@
{<span class="hljs-symbol">:aliases</span> {<span class="hljs-symbol">:export</span> {<span class="hljs-symbol">:exec-fn</span> stelcodes.dev-blog.generator/export},
<span class="hljs-symbol">:repl</span> {<span class="hljs-symbol">:extra-deps</span> {cider/cider-nrepl {<span class="hljs-symbol">:mvn/version</span> <span class="hljs-string">&quot;0.25.2&quot;</span>},
nrepl/nrepl {<span class="hljs-symbol">:mvn/version</span> <span class="hljs-string">&quot;0.8.3&quot;</span>}},
<span class="hljs-symbol">:extra-paths</span> [<span class="hljs-string">&quot;dev&quot;</span>],
<span class="hljs-symbol">:main-opts</span> [<span class="hljs-string">&quot;-m&quot;</span>
<span class="hljs-string">&quot;nrepl.cmdline&quot;</span>
<span class="hljs-string">&quot;--middleware&quot;</span>
<span class="hljs-string">&quot;[cider.nrepl/cider-middleware]&quot;</span>
<span class="hljs-string">&quot;--interactive&quot;</span>]},
<span class="hljs-symbol">:webhook</span> {<span class="hljs-symbol">:exec-fn</span> stelcodes.dev-blog.webhook/listen}},
<span class="hljs-symbol">:deps</span> {http-kit/http-kit {<span class="hljs-symbol">:mvn/version</span> <span class="hljs-string">&quot;2.5.3&quot;</span>},
org.clojure/clojure {<span class="hljs-symbol">:mvn/version</span> <span class="hljs-string">&quot;1.10.1&quot;</span>},
stasis/stasis {<span class="hljs-symbol">:mvn/version</span> <span class="hljs-string">&quot;2.5.1&quot;</span>}},
<span class="hljs-symbol">:paths</span> [<span class="hljs-string">&quot;src&quot;</span> <span class="hljs-string">&quot;resources&quot;</span>]}
14 changes: 14 additions & 0 deletions test/markup/clojure/deps_edn.txt
@@ -0,0 +1,14 @@
{:aliases {:export {:exec-fn stelcodes.dev-blog.generator/export},
:repl {:extra-deps {cider/cider-nrepl {:mvn/version "0.25.2"},
nrepl/nrepl {:mvn/version "0.8.3"}},
:extra-paths ["dev"],
:main-opts ["-m"
"nrepl.cmdline"
"--middleware"
"[cider.nrepl/cider-middleware]"
"--interactive"]},
:webhook {:exec-fn stelcodes.dev-blog.webhook/listen}},
:deps {http-kit/http-kit {:mvn/version "2.5.3"},
org.clojure/clojure {:mvn/version "1.10.1"},
stasis/stasis {:mvn/version "2.5.1"}},
:paths ["src" "resources"]}

0 comments on commit 5d51ee4

Please sign in to comment.