fix: intersperse code contents

main
Xubai Wang 2022-02-18 04:01:31 +08:00
parent 5dc3ab855f
commit cce4285c96
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ partial def modifyElement (element : Element) (linkCode : Bool := true) : HtmlM
for c in contents do
match c with
| Content.Character s =>
newContents := newContents ++ (← s.splitOn.mapM possibleNameToAnchor)
newContents := newContents ++ (← s.splitOn.mapM possibleNameToAnchor).intersperse (Content.Character " ")
| _ => newContents := newContents.push c
pure ⟨ name, attrs, newContents⟩
-- recursively modify