mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix dashes in links.
part of CURA-8565 and/or CURA-8585
This commit is contained in:
parent
c1298c6a5e
commit
518e59303d
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ class PackageModel(QObject):
|
|||
:return: A block of rich text with formatting embedded.
|
||||
"""
|
||||
# Turn all in-line hyperlinks into actual links.
|
||||
url_regex = re.compile(r"(((http|https)://)[a-zA-Z0-9@:%._+~#?&/=]{2,256}\.[a-z]{2,12}(/[a-zA-Z0-9@:%.-_+~#?&/=]*)?)")
|
||||
url_regex = re.compile(r"(((http|https)://)[a-zA-Z0-9@:%.\-_+~#?&/=]{2,256}\.[a-z]{2,12}(/[a-zA-Z0-9@:%.\-_+~#?&/=]*)?)")
|
||||
text = re.sub(url_regex, r'<a href="\1">\1</a>', text)
|
||||
|
||||
# Turn newlines into <br> so that they get displayed as newlines when rendering as rich text.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue