We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55c2aaa commit fb18958Copy full SHA for fb18958
markdown_to_bbcode.py
@@ -118,6 +118,9 @@ def replace_links(match):
118
if bbcode_type == 'steam' and 'youtube.com/watch?v=' in link_url:
119
video_id = re.search(r'v=([^&]+)', link_url).group(1)
120
return f"[previewyoutube={video_id};full][/previewyoutube]"
121
+ elif bbcode_type == 'nexus' and 'youtube.com/watch?v=' in link_url:
122
+ video_id = re.search(r'v=([^&]+)', link_url).group(1)
123
+ return f"[youtube]{video_id}[/youtube]"
124
elif repo_name and not re.match(r'^https?://', link_url):
125
absolute_url = f"https://github.com/{repo_name}/raw/main/{relative_path}/{link_url}"
126
return f"[url={absolute_url}]{link_text}[/url]"
0 commit comments