aboutsummaryrefslogtreecommitdiff
path: root/md.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-11 17:21:31 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-11 17:25:04 -0400
commit2afb23928e1984d475cc460e1672e8f6fa0e4dbe (patch)
treeebd2cc514294d30b6fa4b36c2ee638326f06ef72 /md.bqn
parenteac61ca02074c218667754d5f4ef562e780bae85 (diff)
Allow clicking on header to get fragment link
Diffstat (limited to 'md.bqn')
-rw-r--r--md.bqn7
1 files changed, 5 insertions, 2 deletions
diff --git a/md.bqn b/md.bqn
index 6990f238..c5c579c3 100644
--- a/md.bqn
+++ b/md.bqn
@@ -256,8 +256,11 @@ Markdown ← {filename𝕊𝕩:
b ← bounds ⍋ 𝕩
((2|b)∨∊⟜("-"∾'0'+↕10))⊸/ 𝕩+32×1=b
}
- extensions { tag ∾↩ " id="∾""""(∾∾⊣) Slugify 𝕩 }⍟⊣ 𝕩
- tag Html ProcInline Trim 𝕩
+ ExtHtml ← 𝕩{
+ s←Slugify 𝕗 ⋄ Q ← """"⊸(∾∾⊣)
+ (𝕨 ∾ " id="∾Q s) Html ("a class=""header"" href="∾Q"#"∾s) Html 𝕩
+ }
+ tag extensions◶Html‿ExtHtml ProcInline Trim 𝕩
}⟜⊑
# List items start with a bullet (unordered) or number (ordered).