repared links bug

This commit is contained in:
saloui 2023-06-27 11:18:36 +02:00
parent 260aa7ec56
commit 4038d521a0
3 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title> <title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-b9ea8133.js"></script> <script type="module" crossorigin src="/assets/index-911b9679.js"></script>
<link rel="stylesheet" href="/assets/index-5a734c7a.css"> <link rel="stylesheet" href="/assets/index-5a734c7a.css">
</head> </head>
<body> <body>

View File

@ -89,13 +89,15 @@ markdownIt.renderer.rules.link_open = (tokens, idx, options, env, self) => {
const hrefIndex = token.attrIndex('href'); const hrefIndex = token.attrIndex('href');
if (hrefIndex >= 0) { if (hrefIndex >= 0) {
const hrefValue = token.attrs[hrefIndex][1]; const hrefValue = token.attrs[hrefIndex][1];
token.attrs[hrefIndex][1] = `style="color: blue; font-weight: bold; text-decoration: underline;" ${hrefValue}`; token.attrs[hrefIndex][1] = hrefValue;
token.attrPush(['style', 'color: blue; font-weight: bold; text-decoration: underline;']);
} }
return self.renderToken(tokens, idx, options); return self.renderToken(tokens, idx, options);
}; };
export default { export default {
name: 'MarkdownRenderer', name: 'MarkdownRenderer',
props: { props: {