Monorepo for Tangled tangled.org

appview/pages/markup: add footnot support

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 37ba97b1 cf810fe2

verified
Changed files
+6
appview
pages
+3
appview/pages/markup/markdown.go
··· 56 56 ), 57 57 highlighting.WithCustomStyle(styles.Get("catppuccin-latte")), 58 58 ), 59 + extension.NewFootnote( 60 + extension.WithFootnoteIDPrefix([]byte("footnote")), 61 + ), 59 62 ), 60 63 goldmark.WithParserOptions( 61 64 parser.WithAutoHeadingID(),
+1
appview/pages/markup/sanitizer.go
··· 64 64 65 65 // for code blocks 66 66 policy.AllowAttrs("class").Matching(regexp.MustCompile(`chroma`)).OnElements("pre") 67 + policy.AllowAttrs("class").Matching(regexp.MustCompile(`anchor|footnote-ref|footnote-backref`)).OnElements("a") 67 68 policy.AllowAttrs("class").Matching(regexp.MustCompile(strings.Join(slices.Collect(maps.Values(chroma.StandardTypes)), "|"))).OnElements("span") 68 69 69 70 // centering content
+2
input.css
··· 136 136 137 137 .prose li:has(input) { 138 138 list-style: none; 139 + .prose a.footnote-backref { 140 + @apply no-underline; 139 141 } 140 142 141 143 .prose li {