aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-17 14:25:26 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-17 14:25:26 -0400
commitc57d00c48d70dd9df3c6fdc0aa4883967ed9a9d9 (patch)
treea5a7953dadbe52cf0b4cf50229c48c1bfda0583e /doc
parent70c0f83221be1672b005834bf7f5a796356080cf (diff)
Very lazy HTML block handling
Diffstat (limited to 'doc')
-rw-r--r--doc/md.bqn6
1 files changed, 6 insertions, 0 deletions
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
######