From c57d00c48d70dd9df3c6fdc0aa4883967ed9a9d9 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 17 Jul 2020 14:25:26 -0400 Subject: Very lazy HTML block handling --- doc/md.bqn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/md.bqn b/doc/md.bqn index d9a538db..da18bcfb 100644 --- a/doc/md.bqn +++ b/doc/md.bqn @@ -177,6 +177,11 @@ Markdown ← {𝕊𝕩:1𝕊𝕩; extensions𝕊𝕩: "p" Html ProcInline ¯1 ↓ JoinLines Trim⌾(¯1⊸⊑) (Lead ' '⊸=)⊸↓¨ 𝕩 } + # HTML blocks + # Lazy rule: if it starts with < and contains >, it's probably HTML + IsHtmlBlock ← ⊑ ">"⊸∊ + ProcHtmlBlock ← JoinLines∘⊢ + lineChars‿lineClas‿procFns ← <˘⍉>⟨ "" ‿ (!∘0) ‿ ProcParagraph "#" ‿ LenHeading ‿ ProcHeading @@ -184,6 +189,7 @@ Markdown ← {𝕊𝕩:1𝕊𝕩; extensions𝕊𝕩: # "-+*" ‿ LenBullet ‿ ProcBullet # •d ‿ LenListNum ‿ ProcListNum "|" ‿ IsTable ‿ ProcTable + "<" ‿ IsHtmlBlock ‿ ProcHtmlBlock ⟩ ###### -- cgit v1.2.3