mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 21:49:53 +00:00
fix(app): open links in new tab or browser (#7127)
This commit is contained in:
parent
a10cc63403
commit
ba105246ea
2 changed files with 16 additions and 0 deletions
|
|
@ -379,6 +379,14 @@ export const { use: useMarked, provider: MarkedProvider } = createSimpleContext(
|
|||
name: "Marked",
|
||||
init: () => {
|
||||
return marked.use(
|
||||
{
|
||||
renderer: {
|
||||
link({ href, title, text }) {
|
||||
const titleAttr = title ? ` title="${title}"` : ""
|
||||
return `<a href="${href}"${titleAttr} target="_blank" rel="noopener noreferrer">${text}</a>`
|
||||
},
|
||||
},
|
||||
},
|
||||
markedKatex({
|
||||
throwOnError: false,
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue