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