Repository: rclone/rclone (language: go)

Issue:
Docs include trailing bracket into URL
https://rclone.org/koofr/#standard-options have this section:

![grafik](https://github.com/rclone/rclone/assets/6171135/ae008a3a-dc02-4fad-b379-c6412d2abe56)

As you can see, the trailing bracket `)` is included in the link of the URL, making it not working when clicking it:

`https://app.koofr.net/app/admin/preferences/password)`

The docs seem to come from https://github.com/rclone/rclone/blob/master/docs/content/koofr.md. This file doesn't have the problem:

![grafik](https://github.com/rclone/rclone/assets/6171135/f2a784bb-dce3-49b7-8a47-a87c5ad26b23)

I assume that this is some issue with the conversion of Markdown to the docs HTML. Possibly also an upstream issue.


Discussion / hints:
You can just submit a PR to fix.
> The docs seem to come from https://github.com/rclone/rclone/blob/master/docs/content/koofr.md. This file doesn't have the problem:

This section is auto generated from here:

https://github.com/rclone/rclone/blob/6e4dd2ab965b009607823b575b2e751e7648031d/backend/koofr/koofr.go#L69-L80

Feel free to fix it. If there is problem with `)` maybe just remove it? e.g.:

`Your password for rclone - generate one at https://app.koofr.net/app/admin/preferences/password`

Do the same for `digistorage` too.

For such simple changes just hit `edit` of github and create PR.
Thanks for the hints so far. The thing is, and that is why I created an issue: This seems to be a systematic bug. The bracket should not be included in the link. Of course, the quick fix is to remove the bracket. But I hoped, there would be a better fix (maybe upstream in the software used to generate the website).
> Thanks for the hints so far. The thing is, and that is why I created an issue: This seems to be a systematic bug. The bracket should not be included in the link. Of course, the quick fix is to remove the bracket. But I hoped, there would be a better fix (maybe upstream in the software used to generate the website).

Good idea. In the meantime you can implement quick fix and then follow with upstream.
Hugo (https://github.com/gohugoio/hugo) is the tool used to generate the html.

I guess it is doing some automatic link detection. Did a very quick search, but couldn't find an existing issue for this, only the opposite: Links such as "https://en.wikipedia.org/wiki/Plane_(geometry)" did not include the ending `)`. We use the original description also for command line output of `rclone help backend koofr`, so we don't want to embed a lot of hugo/html specific notation either.
I tried upgrading hugo (the software which builds the website) to the latest version but it made no difference.

So removing the `()` or maybe putting a space before the `)` might be the way to go.

However point taken - maybe we can configure this in hugo.

The markdown rendering is done by https://github.com/yuin/goldmark which claims it can use GitHub flavoured markdown https://github.github.com/gfm/#autolinks-extension- which addresses the problem directly

> When an autolink ends in ), we scan the entire autolink for the total number of parentheses. If there is a greater number of closing parentheses than opening ones, we don’t consider the unmatched trailing parentheses part of the autolink, in order to facilitate including an autolink inside a parenthesis:

In fact Hugo claims to be Github Flavored Markdown [out of the box](https://gohugo.io/getting-started/configuration-markup/)

> Unless you need a unique capability provided by one of the alternate markdown handlers, we strongly recommend that you use the default setting. Goldmark is fast, well maintained, conforms to the [CommonMark](https://spec.commonmark.org/0.30/) specification, and is compatible with [GitHub Flavored Markdown](https://github.github.com/gfm/) (GFM).

This is how we've configured the Goldmark renderer

https://github.com/rclone/rclone/blob/ef2c5a199870bc3cfdb0b854576c7749350c7aa7/docs/config.json#L26-L35

I tried various things but I couldn't get it to do anything different!
Alright! Then the quick workaround will need to suffice for now! I hope I can get around providing a PR, soon!
sorry for the commit spam here, did some silly stuff on my fork, quick fix should be good to go though now.

Fix patch:
diff --git a/go.mod b/go.mod
index c1691b78f0aee..82d8c4c67cc95 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
 	github.com/aws/smithy-go v1.22.1
 	github.com/buengese/sgzip v0.1.1
 	github.com/cloudinary/cloudinary-go/v2 v2.9.0
-	github.com/cloudsoda/go-smb2 v0.0.0-20231124195312-f3ec8ae2c891
+	github.com/cloudsoda/go-smb2 v0.0.0-20241223203758-52b943b88fd6
 	github.com/colinmarc/hdfs/v2 v2.4.0
 	github.com/coreos/go-semver v0.3.1
 	github.com/coreos/go-systemd/v22 v22.5.0
diff --git a/go.sum b/go.sum
index 6a3820d3593b9..9941b15abdec1 100644
--- a/go.sum
+++ b/go.sum
@@ -177,8 +177,8 @@ github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vc
 github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
 github.com/cloudinary/cloudinary-go/v2 v2.9.0 h1:8C76QklmuV4qmKAC7cUnu9D68X9kCkFMuLspPikECCo=
 github.com/cloudinary/cloudinary-go/v2 v2.9.0/go.mod h1:ireC4gqVetsjVhYlwjUJwKTbZuWjEIynbR9zQTlqsvo=
-github.com/cloudsoda/go-smb2 v0.0.0-20231124195312-f3ec8ae2c891 h1:nPP4suUiNage0vvyEBgfAnhTPwwXhNqtHmSuiCIQwKU=
-github.com/cloudsoda/go-smb2 v0.0.0-20231124195312-f3ec8ae2c891/go.mod h1:xFxVVe3plxwhM+6BgTTPByEgG8hggo8+gtRUkbc5W8Q=
+github.com/cloudsoda/go-smb2 v0.0.0-20241223203758-52b943b88fd6 h1:mLY/79N73URZ2J/oRKTxmfhCgxThzBmjQ6XOjX5tYjI=
+github.com/cloudsoda/go-smb2 v0.0.0-20241223203758-52b943b88fd6/go.mod h1:0aLYPsmguHbok591y6hI5yAqU0drbUzrPEO10ZpgTTw=
 github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
 github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
 github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=


Test patch: