This commit is contained in:
parent
a850af0526
commit
8668878548
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ var funcMap = template.FuncMap{
|
|||
}
|
||||
converted := buf.String()
|
||||
converted = strings.Replace(converted, `<img `, `<img loading="lazy" `, -1)
|
||||
if os.Getenv("LEMMY_DOMAIN") != "" {
|
||||
if os.Getenv("LEMMY_DOMAIN") == "" {
|
||||
re := regexp.MustCompile(`href="https:\/\/([a-zA-Z0-9\.]+\/(c\/[a-zA-Z0-9]+|(post|comment)\/\d+))`)
|
||||
converted = re.ReplaceAllString(converted, `href="/$1`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue