diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-24 17:04:47 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-24 17:04:47 -0500 |
| commit | 3d78f125185ce47784245d6619f2878a6ad1b587 (patch) | |
| tree | 0e6f1813098e7a40adde928e0adcd42dc7bbea78 /md.bqn | |
| parent | 3338439f07f5e583d317ba9c6aed75e0b6093c3f (diff) | |
Trim header name before creating slug
Diffstat (limited to 'md.bqn')
| -rw-r--r-- | md.bqn | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -249,6 +249,7 @@ Markdown ← {filename𝕊𝕩: tail ← ∧`⌾⌽ trsp∨𝕩='#' # Mask of trailing hashes f ← <⟜« tail # Character before trailing hashes 𝕩 /˜↩ ¬ f (⊑⟨"\"," ",""⟩⊐<f/𝕩)◶⟨⊣,⊢,⊢,0¨⊢⟩ tail + 𝕩 Trim↩ # Add an id, containing only a-z, digits, and hyphens Slugify ← { 𝕩 ↩ '-'¨⌾((𝕩=' ')⊸/) 𝕩 # Replace spaces with dashes @@ -261,7 +262,7 @@ Markdown ← {filename𝕊𝕩: s←Slugify 𝕗 ⋄ Q ← """"⊸(∾∾⊣) (𝕨 ∾ " id="∾Q s) Html ("a class=""header"" href="∾Q"#"∾s) Html 𝕩 } - tag extensions◶Html‿ExtHtml ProcInline Trim 𝕩 + tag extensions◶Html‿ExtHtml ProcInline 𝕩 }⟜⊑ # List items start with a bullet (unordered) or number (ordered). |
