From 618d199b17bb3a6ea22d7b13d551ff23061f95f3 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 17 Jul 2020 20:39:24 -0400 Subject: Support unordered lists with 1-line items --- doc/md.bqn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/md.bqn b/doc/md.bqn index 9a3c90bc..41b4ec2a 100644 --- a/doc/md.bqn +++ b/doc/md.bqn @@ -151,8 +151,11 @@ Markdown ← {𝕊𝕩:1𝕊𝕩; extensions𝕊𝕩: }⟜⊑ # List items start with a bullet (unordered) or number (ordered). - LenBullet ← 2 × 1 (<⟜≠)◶⟨0,' '=⊑⟩ ⊢ - LenListNum ← { + LenBullet ← +⟜× ·≤⟜4⊸× ·Lead ' '=1⊸↓ + ProcBullet ← { + "ul" Html lf ∾ JoinLines ("li" Html ProcInline)¨ 𝕨 ↓¨ 𝕩 + } + LenListNum ← { # Not used yet n ← Lead 𝕩∊•d l ← (1≤n) ∧ (9≥n) ' ' = n ↓ 𝕩 @@ -196,7 +199,7 @@ Markdown ← {𝕊𝕩:1𝕊𝕩; extensions𝕊𝕩: "" ‿ (!∘0) ‿ ProcParagraph "#" ‿ LenHeading ‿ ProcHeading " " ‿ IsCode ‿ ProcCode - # "-+*" ‿ LenBullet ‿ ProcBullet + "-+*" ‿ LenBullet ‿ ProcBullet # •d ‿ LenListNum ‿ ProcListNum "|" ‿ IsTable ‿ ProcTable "<" ‿ IsHtmlBlock ‿ ProcHtmlBlock -- cgit v1.2.3