Skip to content

Commit

Permalink
fix highlight setting; tag 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Mar 31, 2022
1 parent fbd45f4 commit 30b6750
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
18 changes: 16 additions & 2 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{} (:package |docs-workflow)
:configs $ {} (:init-fn |docs-workflow.main/main!) (:reload-fn |docs-workflow.main/reload!)
:modules $ [] |respo.calcit/ |lilac/ |memof/ |respo-ui.calcit/ |respo-markdown.calcit/ |reel.calcit/ |respo-router.calcit/ |alerts.calcit/
:version |0.0.2
:version |0.0.3
:entries $ {}
:files $ {}
|docs-workflow.comp.container $ {}
Expand Down Expand Up @@ -151,7 +151,7 @@
js-object (:html false) (:breaks true)
:highlight $ fn (code lang)
if (= lang "\"cirru") (color/generate code)
.-value $ .!highlightAuto hljs code lang
.-value $ .!highlightAuto hljs code (js-array lang)
|comp-page-entries $ quote
defcomp comp-page-entries (selected parent-path entries on-select)
div
Expand Down Expand Up @@ -270,6 +270,7 @@
"\"highlight.js" :default hljs
"\"highlight.js/lib/languages/bash" :default bash-lang
"\"highlight.js/lib/languages/clojure" :default clojure-lang
"\"highlight.js/lib/languages/rust" :default rust-lang
:defs $ {}
|render-app! $ quote
defn render-app! () $ render! mount-target (comp-container @*reel schema/docs) dispatch!
Expand All @@ -282,7 +283,7 @@
|*reel $ quote
defatom *reel $ -> reel-schema/reel (assoc :base schema/store) (assoc :store schema/store)
|main! $ quote
defn main! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang)
defn main! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang) (.!registerLanguage hljs "\"rust" rust-lang)
println "\"Running mode:" $ if config/dev? "\"dev" "\"release"
if config/dev? $ load-console-formatter!
render-app!
Expand Down
10 changes: 10 additions & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ println "|a demo of code"
defn f1 ()
+ 1 2 4
```

```clojure
(+ 1 2)
```

```rust
fn main() -> i64 {
1
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {
"@calcit/procs": "^0.5.28"
},
Expand Down

0 comments on commit 30b6750

Please sign in to comment.