1.1 --- a/moinformat/links/html.py Fri Apr 07 23:37:44 2023 +0200
1.2 +++ b/moinformat/links/html.py Sat Apr 08 00:03:14 2023 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 HTML linking scheme.
1.6
1.7 -Copyright (C) 2018, 2019, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2018, 2019, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -114,8 +114,10 @@
1.13
1.14 document_index = self.metadata.get("document_index")
1.15
1.16 - t[0] = "%s%s%s" % (top_level and "%s/" % top_level or "", resolved,
1.17 - document_index and "/%s" % document_index or "")
1.18 + t[0] = "%s%s%s%s" % (top_level and "%s/" % top_level or "",
1.19 + resolved,
1.20 + resolved and "/" or "",
1.21 + document_index or "")
1.22
1.23 return self.quote("#".join(t))
1.24