From 9792de2630a9b40da00b2eefb46eb9977c2c6b08 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 16 Jul 2020 20:41:55 -0400 Subject: Add basic table support --- doc/md.bqn | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/md.bqn b/doc/md.bqn index 632f2d78..8d9c7648 100644 --- a/doc/md.bqn +++ b/doc/md.bqn @@ -76,6 +76,9 @@ Markdown ← { last ⊏ 𝕨 } + # Remove leading and trailing spaces + Trim ← { 𝕩 /˜ ¬ (∧` ∨ ∧`⌾⌽) ' '=𝕩 } + ###### # First we classify each line based on the type of block it can start. ClassifyLine ← (0<≠)◶(0‿0)‿{ @@ -108,8 +111,7 @@ Markdown ← { tail ← ∧`⌾⌽ trsp∨𝕩='#' # Mask of trailing hashes f ← tail < 0 Shr tail # Character before trailing hashes 𝕩 /˜↩ ¬ f (⊑⟨"\"," ",""⟩⊐