File tree Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 23
23
[clojure.zip :as z]
24
24
[nextjournal.markdown.transform :as md.transform]
25
25
[nextjournal.markdown.utils.emoji :as emoji]
26
- #?@(:cljs [[applied-science.js-interop :as j]
27
- [cljs.reader :as reader]])))
26
+ #?@(:cljs [[applied-science.js-interop :as j]])))
28
27
29
28
; ; clj common accessors
30
29
(def get-in* #? (:clj get-in :cljs j/get-in))
Original file line number Diff line number Diff line change 1
1
(ns nextjournal.markdown.render
2
2
(:require
3
- [" katex" :as katex]
4
- [" @codemirror/language" :refer [defaultHighlightStyle syntaxHighlighting LanguageSupport]]
3
+ [" @codemirror/lang-markdown" :as MD :refer [markdown markdownLanguage]]
4
+ [" @codemirror/language" :refer [defaultHighlightStyle LanguageSupport
5
+ syntaxHighlighting]]
5
6
[" @codemirror/state" :refer [EditorState]]
6
7
[" @codemirror/view" :refer [EditorView keymap]]
7
- [" @codemirror/lang-markdown " :as MD :refer [markdown markdownLanguage] ]
8
+ [" katex " :as katex ]
8
9
[" react" :as react]
9
- [nextjournal.markdown :as md]
10
- [nextjournal.clerk.viewer :as v]
11
- [nextjournal.clerk.render.hooks :as hooks]
12
- [nextjournal.markdown.transform :as md.transform]
13
- [nextjournal.clojure-mode :as clojure-mode]
14
- [nextjournal.clerk.render.code :as code]
15
10
[clojure.string :as str]
16
11
[nextjournal.clerk.render :as render]
12
+ [nextjournal.clerk.render.code :as code]
13
+ [nextjournal.clerk.render.hooks :as hooks]
14
+ [nextjournal.clerk.viewer :as v]
15
+ [nextjournal.clojure-mode :as clojure-mode]
16
+ [nextjournal.markdown :as md]
17
+ [nextjournal.markdown.transform :as md.transform]
17
18
[reagent.core :as r]))
18
19
19
20
(def theme #js {" &.cm-editor.cm-focused" #js {:outline " none" }
Original file line number Diff line number Diff line change 2
2
(ns parsing-extensibility
3
3
{:nextjournal.clerk/toc :collapsed
4
4
:nextjournal.clerk/no-cache true }
5
- (:require [nextjournal.clerk :as clerk]
6
- [nextjournal.markdown :as md]
7
- [nextjournal.markdown.utils :as u]
5
+ (:require [clojure.repl :as repl]
6
+ [clojure.zip :as z]
8
7
[edamame.core :as edamame]
9
- [clojure.zip :as z]))
8
+ [nextjournal.clerk :as clerk]
9
+ [nextjournal.markdown :as md]
10
+ [nextjournal.markdown.utils :as u]))
10
11
11
12
^{:nextjournal.clerk/visibility {:code :hide :result :hide }}
12
13
(def show-text
@@ -89,7 +90,7 @@ existing [[links]] or #tags")
89
90
; ; ## Parsing with Document Handlers
90
91
; ;
91
92
; ; Using tokenizers with document handlers we can let parsed tokens act upon the whole document tree. Consider
92
- ; ; the following textual example (**TODO** _rewrite parsing with a zipper state_):
93
+ ; the following textual example (**TODO** _rewrite parsing with a zipper state_):
93
94
^{::clerk/viewer show-text}
94
95
(def text-with-meta
95
96
" # Example ◊(add-meta {:attrs {:id \" some-id\" } :class \" semantc\" })
Original file line number Diff line number Diff line change 3
3
{:nextjournal.clerk/no-cache true }
4
4
(:require [clojure.data.json :as json]
5
5
[clojure.java.shell :as shell]
6
+ [clojure.pprint :as pprint]
6
7
[nextjournal.clerk :as clerk]
7
8
[nextjournal.clerk.viewer :as v]
8
- [nextjournal.markdown :as md]
9
- [hiccup2.core :as h]
10
- [nextjournal.markdown.transform :as md.transform]))
9
+ [nextjournal.markdown :as md]))
11
10
12
11
; ; Markdown (commonmark) distingushes between [loose and tight lists](https://spec.commonmark.org/0.30/#loose)
13
12
; ;
You can’t perform that action at this time.
0 commit comments