File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,10 @@ def replace_links(match):
117117 link_text , link_url = match .groups ()
118118 if bbcode_type == 'steam' and 'youtube.com/watch?v=' in link_url :
119119 video_id = re .search (r'v=([^&]+)' , link_url ).group (1 )
120- return f"[previewyoutube={ video_id } ;full][/previewyoutube]"
120+ return f"{ link_text } \n [previewyoutube={ video_id } ;full][/previewyoutube]"
121121 elif bbcode_type == 'nexus' and 'youtube.com/watch?v=' in link_url :
122122 video_id = re .search (r'v=([^&]+)' , link_url ).group (1 )
123- return f"[youtube]{ video_id } [/youtube]"
123+ return f"{ link_text } \n [youtube]{ video_id } [/youtube]"
124124 elif repo_name and not re .match (r'^https?://' , link_url ):
125125 absolute_url = f"https://github.com/{ repo_name } /raw/main/{ relative_path } /{ link_url } "
126126 return f"[url={ absolute_url } ]{ link_text } [/url]"
You can’t perform that action at this time.
0 commit comments