mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-03-25 08:53:04 -04:00
Instead of going with a single extension, extracted by `filepath.Ext()`, all possible extensions are now generated for a given filename, by splitting the filename using a "." separator, starting with the longest candidate. Moreover, each extension candidate is matched against the actual set of known renderers (`extRenderers`), and only the longest matching extension is used. Resolves https://codeberg.org/forgejo/forgejo/issues/5190. Co-authored-by: Michael Hanke <michael.hanke@gmail.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11439 Reviewed-by: Ellen Εμιλία Άννα Zscheile <fogti@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Matthias Riße <matrss@0px.xyz> Co-committed-by: Matthias Riße <matrss@0px.xyz> |
||
|---|---|---|
| .. | ||
| asciicast | ||
| common | ||
| console | ||
| csv | ||
| external | ||
| markdown | ||
| mdstripper | ||
| orgmode | ||
| tests/repo/repo1_filepreview | ||
| camo.go | ||
| camo_test.go | ||
| file_preview.go | ||
| html.go | ||
| html_internal_test.go | ||
| html_test.go | ||
| renderer.go | ||
| renderer_test.go | ||
| sanitizer.go | ||
| sanitizer_test.go | ||