Remove unneeded case for a trailing dot

This commit is contained in:
Mai-Lapyst 2024-03-25 14:33:54 +01:00
parent d6428f92ce
commit 069d87b80f
No known key found for this signature in database
GPG key ID: F88D929C09E239F8

View file

@ -62,14 +62,6 @@ func NewFilePreview(ctx *RenderContext, node *html.Node, locale translation.Loca
preview.start = m[0] preview.start = m[0]
preview.end = m[1] preview.end = m[1]
// If url ends in '.', it's very likely that it is not part of the
// actual url but used to finish a sentence.
if strings.HasSuffix(preview.urlFull, ".") {
preview.end--
preview.urlFull = preview.urlFull[:len(preview.urlFull)-1]
hash = hash[:len(hash)-1]
}
projPathSegments := strings.Split(projPath, "/") projPathSegments := strings.Split(projPath, "/")
fileContent, err := DefaultProcessorHelper.GetRepoFileContent( fileContent, err := DefaultProcessorHelper.GetRepoFileContent(
ctx.Ctx, ctx.Ctx,