From a4d5dd4420bc22b090408f92f6e4c451fb38a80f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 23 Sep 2020 22:39:13 -0400 Subject: Catch errors when evaluating markdown code blocks and print ERROR --- md.bqn | 4 ++-- 1 file 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 } 𝕩 -- cgit v1.2.3