1.1 --- a/moinformat/utils/links.py Sat Apr 08 23:10:02 2023 +0200
1.2 +++ b/moinformat/utils/links.py Tue Jun 20 18:58:47 2023 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Link target parsing.
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 @@ -123,9 +123,10 @@
1.13 prefix, identifier = t
1.14
1.15 mapping = metadata and metadata.get("mapping")
1.16 + pagename = metadata and metadata.get("pagename")
1.17
1.18 if prefix == "attachment" or mapping and mapping.get(prefix):
1.19 - return LinkTarget(prefix, target, identifier)
1.20 + return LinkTarget(prefix, target, identifier, pagename)
1.21
1.22 return None
1.23