mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 10:37:20 +00:00
Render embedded code preview by permlink in markdown (#30234)
The permlink in markdown will be rendered as a code preview block, like GitHub Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@ -14,6 +14,8 @@ import (
|
||||
func ProcessorHelper() *markup.ProcessorHelper {
|
||||
return &markup.ProcessorHelper{
|
||||
ElementDir: "auto", // set dir="auto" for necessary (eg: <p>, <h?>, etc) tags
|
||||
|
||||
RenderRepoFileCodePreview: renderRepoFileCodePreview,
|
||||
IsUsernameMentionable: func(ctx context.Context, username string) bool {
|
||||
mentionedUser, err := user.GetUserByName(ctx, username)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user