mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
Merge pull request #15029 from Classic298/correct-markdown-rendering-model-descriptions
fix: Correct markdown rendering model descriptions
This commit is contained in:
commit
e79f31b9c4
@ -46,7 +46,7 @@
|
|||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={marked.parse(
|
content={marked.parse(
|
||||||
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description ?? '')
|
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description ?? '').replaceAll('\n', '<br>')
|
||||||
)}
|
)}
|
||||||
placement="right"
|
placement="right"
|
||||||
>
|
>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3 markdown"
|
class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3 markdown"
|
||||||
>
|
>
|
||||||
{@html marked.parse(
|
{@html marked.parse(
|
||||||
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description)
|
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description).replaceAll('\n', '<br>')
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{#if models[selectedModelIdx]?.info?.meta?.user}
|
{#if models[selectedModelIdx]?.info?.meta?.user}
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
let tokens = [];
|
let tokens = [];
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
throwOnError: false
|
throwOnError: false,
|
||||||
|
breaks: true
|
||||||
};
|
};
|
||||||
|
|
||||||
marked.use(markedKatexExtension(options));
|
marked.use(markedKatexExtension(options));
|
||||||
|
@ -164,7 +164,7 @@
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
className=" w-fit"
|
className=" w-fit"
|
||||||
content={marked.parse(
|
content={marked.parse(
|
||||||
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description ?? '')
|
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description ?? '').replaceAll('\n', '<br>')
|
||||||
)}
|
)}
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
@ -172,7 +172,7 @@
|
|||||||
class="mt-0.5 px-2 text-sm font-normal text-gray-500 dark:text-gray-400 line-clamp-2 max-w-xl markdown"
|
class="mt-0.5 px-2 text-sm font-normal text-gray-500 dark:text-gray-400 line-clamp-2 max-w-xl markdown"
|
||||||
>
|
>
|
||||||
{@html marked.parse(
|
{@html marked.parse(
|
||||||
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description)
|
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description ?? '').replaceAll('\n', '<br>')
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user