Skip to content

Commit d9b8d88

Browse files
committed
minor cleanup of notebooks
1 parent 52dd673 commit d9b8d88

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

dev/nextjournal/markdown/parser.cljc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
[clojure.zip :as z]
2424
[nextjournal.markdown.transform :as md.transform]
2525
[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]])))
2827

2928
;; clj common accessors
3029
(def get-in* #?(:clj get-in :cljs j/get-in))

dev/nextjournal/markdown/render.cljs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
(ns nextjournal.markdown.render
22
(: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]]
56
["@codemirror/state" :refer [EditorState]]
67
["@codemirror/view" :refer [EditorView keymap]]
7-
["@codemirror/lang-markdown" :as MD :refer [markdown markdownLanguage]]
8+
["katex" :as katex]
89
["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]
1510
[clojure.string :as str]
1611
[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]
1718
[reagent.core :as r]))
1819

1920
(def theme #js {"&.cm-editor.cm-focused" #js {:outline "none"}

notebooks/parsing_extensibility.clj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
(ns parsing-extensibility
33
{:nextjournal.clerk/toc :collapsed
44
: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]
87
[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]))
1011

1112
^{:nextjournal.clerk/visibility {:code :hide :result :hide}}
1213
(def show-text
@@ -89,7 +90,7 @@ existing [[links]] or #tags")
8990
;; ## Parsing with Document Handlers
9091
;;
9192
;; 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_):
9394
^{::clerk/viewer show-text}
9495
(def text-with-meta
9596
"# Example ◊(add-meta {:attrs {:id \"some-id\"} :class \"semantc\"})

notebooks/tight_lists.clj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
{:nextjournal.clerk/no-cache true}
44
(:require [clojure.data.json :as json]
55
[clojure.java.shell :as shell]
6+
[clojure.pprint :as pprint]
67
[nextjournal.clerk :as clerk]
78
[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]))
1110

1211
;; Markdown (commonmark) distingushes between [loose and tight lists](https://spec.commonmark.org/0.30/#loose)
1312
;;

0 commit comments

Comments
 (0)