File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,17 @@ void TemplateSelector::removeTemplate()
629
629
void TemplateSelector::openTemplateLocation ()
630
630
{
631
631
TemplateHandle th = selectedTemplate ();
632
- QString url = " file:///" + QFileInfo (th.file ()).absolutePath ();
632
+ QString url = th.file ();
633
+ QString proto = url;
634
+ proto.truncate (8 );
635
+ if (proto==" https://" ) {
636
+ url.replace (0 , QString ( " https://raw.githubusercontent.com/texstudio-org/texstudio-template/main" ).size (),
637
+ " https://github.com/texstudio-org/texstudio-template/tree/main" );
638
+ url.truncate (url.lastIndexOf (" /" ));
639
+ }
640
+ else {
641
+ url = " file:///" + QFileInfo (th.file ()).absolutePath ();
642
+ }
633
643
if (!QDesktopServices::openUrl (QUrl (url))) {
634
644
UtilsUi::txsCritical (tr (" Could not open location:" ) + QString (" \n %1" ).arg (url));
635
645
}
You can’t perform that action at this time.
0 commit comments