aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-23 22:39:13 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-23 22:39:13 -0400
commita4d5dd4420bc22b090408f92f6e4c451fb38a80f (patch)
tree2886922325ee2921856005d0128b9f469779894b
parent331f06b9868694e0210658457713e33147d5b6ec (diff)
Catch errors when evaluating markdown code blocks and print ERROR
-rw-r--r--md.bqn4
1 files changed, 2 insertions, 2 deletions
diff --git a/md.bqn b/md.bqn
index f28d4dcc..43602132 100644
--- a/md.bqn
+++ b/md.bqn
@@ -58,7 +58,7 @@ PrecedesGroup ← {
# false value, and normal indices are increased by 1.
𝕨 ∾˜↩ 0
inds ← 1 + ↕≠𝕩
- # Zero out indices where x was true, and find the greatest index so
+ # Zero out indices where 𝕩 was true, and find the greatest index so
# far at each position.
last ← ⌈` inds × ¬𝕩
last ⊏ 𝕨
@@ -193,7 +193,7 @@ Markdown ← {filename𝕊𝕩:
(⊑g⊐1) (<⟜(≠g))◶⟨1,¬(" "∾∾idChars)∧´∘∊˜↑⟩ 𝕩
}
r‿ri ← addRslt◶(2⥊<⟨⟩)‿{
- ⟨ (ShowRslt ⊣◶⟨"",(⥊∾⟜lf⎉1)∘Fmt∘⊢⟩ CodeExec)⍟(0<≠)¨ 𝕩
+ ⟨ (ShowRslt ⊣◶⟨"",(⥊∾⟜lf⎉1)∘Fmt∘⊢⟩ CodeExec)⎊"ERROR"⍟(0<≠)¨ 𝕩
1 -˜ +` 1 + ≠¨ 𝕩 ⟩ # Don't forget the trailing newline
} 𝕩