From 54a0af34fb7a0c6a7cfb6d2712ec23a25eed4509 Mon Sep 17 00:00:00 2001 From: nicole mikołajczyk Date: Mon, 9 Jun 2025 16:00:25 +0200 Subject: [feature] enable footnote extension for markdown parser (#4251) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk # Description This enables footnote support which is mentioned as allowed in the [user guide](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/docs/user_guide/posts.md#input-types). The regression was reported on Matrix. ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [sort of] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [x] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4251 Co-authored-by: nicole mikołajczyk Co-committed-by: nicole mikołajczyk --- internal/text/markdown.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/text/markdown.go') diff --git a/internal/text/markdown.go b/internal/text/markdown.go index a26182598..e4b633e75 100644 --- a/internal/text/markdown.go +++ b/internal/text/markdown.go @@ -141,6 +141,7 @@ func (f *Formatter) fromMarkdown( extension.NewLinkify( extension.WithLinkifyURLRegexp(regexes.URLLike), ), + extension.Footnote, extension.Strikethrough, ), ) -- cgit v1.2.3