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 6eb2267 commit 903617bCopy full SHA for 903617b
1 file changed
htdocs/js/pages/admin/Marketplace.class.js
@@ -515,6 +515,7 @@ Page.Marketplace = class Marketplace extends Page.PageUtils {
515
// fix all local hash links to point back to remote repo
516
var args = this.args;
517
var anchor = args.anchor || '';
518
+ var repo_base_url = this.product.repo_url || `https://github.com/${this.product.id}`;
519
520
if (!elem) elem = this.div;
521
else if (typeof(elem) == 'string') elem = $(elem);
@@ -533,6 +534,9 @@ Page.Marketplace = class Marketplace extends Page.PageUtils {
533
534
if (href.match(/^\#/)) {
535
$this.attr({ 'href': '#' + Nav.loc + '/' + href.replace(/\#/, '') });
536
}
537
+ else if (href.match(/^[\w\-\.]+$/)) {
538
+ $this.attr({ 'href': repo_base_url + '/blob/main/' + href });
539
+ }
540
} );
541
542
0 commit comments