mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 10:02:26 +03:00
Add a custom renderer for links, same as in ToastControlelr
This commit is contained in:
parent
5fe888c1b0
commit
16f834fc08
@ -41,6 +41,12 @@
|
||||
onMount(() => {
|
||||
laneWidth = lscache.get(laneWidthKey);
|
||||
});
|
||||
|
||||
var renderer = new marked.Renderer();
|
||||
renderer.link = function (href, title, text) {
|
||||
if (!title) title = text;
|
||||
return '<a target="_blank" href="' + href + '" title="' + title + '">' + text + '</a>';
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="base">
|
||||
@ -56,7 +62,7 @@
|
||||
<div class="card">
|
||||
<div class="card__header">PR Description</div>
|
||||
<div class="card__content">
|
||||
{@html marked.parse(pr.body)}
|
||||
{@html marked.parse(pr.body, { renderer })}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user