Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-29 05:06:11 +01:00
forgejo/templates/repo/issue
KN4CK3R 637451a45e
Rework markup link rendering (#26745)
Fixes #26548

This PR refactors the rendering of markup links. The old code uses
`strings.Replace` to change some urls while the new code uses more
context to decide which link should be generated.

The added tests should ensure the same output for the old and new
behaviour (besides the bug).

We may need to refactor the rendering a bit more to make it clear how
the different helper methods render the input string. There are lots of
options (resolve links / images / mentions / git hashes / emojis / ...)
but you don't really know what helper uses which options. For example,
we currently support images in the user description which should not be
allowed I think:

<details>
  <summary>Profile</summary> 

https://try.gitea.io/KN4CK3R

![grafik](https://github.com/go-gitea/gitea/assets/1666336/109ae422-496d-4200-b52e-b3a528f553e5)

</details>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-01-15 08:49:24 +00:00
..
fields Fix required checkboxes in issue forms (#27592) 2023-10-19 11:43:15 +00:00
labels Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) 2023-10-17 16:10:45 +02:00
milestone Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
view_content Add non-JS fallback for reaction tooltips (#28785) 2024-01-15 09:42:59 +08:00
branch_selector_field.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
card.tmpl Improve CSS helper naming (#28769) 2024-01-12 20:28:01 +08:00
choose.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
comment_tab.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
filter_actions.tmpl Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) 2023-10-17 16:10:45 +02:00
filter_list.tmpl Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
filters.tmpl Refactor template empty checks (#28351) 2023-12-04 15:48:42 -06:00
label_precolors.tmpl Refactor some CSS styles and simplify code (#26771) 2023-08-28 22:14:51 +08:00
labels.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
list.tmpl Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00
milestone_issues.tmpl Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00
milestone_new.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
milestones.tmpl Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
navbar.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
new.tmpl Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00
new_form.tmpl [FIX] missing ctx in new_form (#27514) 2023-10-08 14:35:20 +08:00
openclose.tmpl Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
search.tmpl Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
view.tmpl Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00
view_content.tmpl Remove "tabindex" from some form buttons (#27892) 2023-11-03 14:40:48 +00:00
view_title.tmpl Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00