web: clickable links in terminal rows and dashboard messages (issue #233)
This commit is contained in:
parent
4b51c198d5
commit
15e44955a8
5 changed files with 82 additions and 8 deletions
|
|
@ -755,6 +755,12 @@
|
|||
try {
|
||||
marked.setOptions({ breaks: true, gfm: true });
|
||||
div.innerHTML = marked.parse(src);
|
||||
// marked autolinks URLs but leaves them same-tab — open them
|
||||
// externally so a click never unloads the terminal. (issue #233)
|
||||
div.querySelectorAll('a[href]').forEach((a) => {
|
||||
a.target = '_blank';
|
||||
a.rel = 'noopener noreferrer';
|
||||
});
|
||||
} catch (err) {
|
||||
console.warn('marked failed', err);
|
||||
div.textContent = src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue