Skip to content

Commit c674c8d

Browse files
committed
If visual-syntax is _not_ provided, default to option setting
1 parent 20cf767 commit c674c8d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/interactive_syntax/core.cljs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,8 @@
12111211
:as print-options} :print-options
12121212
editor-reset-ref :editor-reset
12131213
visr-run-ref :visr-run
1214-
visual-syntax :visual-syntax}]]
1214+
visual-syntax :visual-syntax
1215+
:or {:visual-syntax true}}]]
12151216
(let [edit (atom nil)
12161217
visrs (atom {})
12171218
key (random-uuid)
@@ -1273,6 +1274,7 @@
12731274
(ocall doc :replaceRange stdlib/starter-visr pos)))
12741275
(fn [{:keys [menu input options file-changed current-file cursor scroll cache
12751276
cm-ref]
1277+
:or {:visual-syntax true}
12761278
:as db}
12771279
& [{editor-ref :editor
12781280
for-print :for-print
@@ -1360,7 +1362,8 @@
13601362
(defn result-view [{:keys [output options]
13611363
:as db}
13621364
& [{repl-ref :editor
1363-
visual-syntax :visual-syntax}]]
1365+
visual-syntax :visual-syntax
1366+
:or {:visual-syntax true}}]]
13641367
(let [edit (atom nil)
13651368
cache (env/make-reset-editors-cache)
13661369
instances (atom [])
@@ -1404,7 +1407,8 @@
14041407
(fn [{:keys [output options]
14051408
:as db}
14061409
& [{repl-ref :editor
1407-
visual-syntax :visual-syntax}]]
1410+
visual-syntax :visual-syntax
1411+
:or {:visual-syntax true}}]]
14081412
[:> cm/UnControlled
14091413
{:value (string/join "\n" (filter string? @output))
14101414
:options (conj (env/codemirror-options db)
@@ -1475,6 +1479,7 @@
14751479
repl-ref :repl
14761480
visr-run-ref :visr-run
14771481
visual-syntax :visual-syntax
1482+
:or {:visual-syntax true}
14781483
:as opts}]]
14791484
(let [search (js/URLSearchParams. js/window.location.search)]
14801485
(chonky/setChonkyDefaults

0 commit comments

Comments
 (0)