This commit is contained in:
Saifeddine ALOUI 2023-06-29 18:16:15 +02:00
commit 6f7b241be9
7 changed files with 180 additions and 151 deletions

View File

@ -17,9 +17,7 @@ GET http://localhost:9600/list_discussions
POST http://localhost:9600/load_discussion
Content-Type: application/json
{
"id": 1 // Discussion ID Must be integer
}
{"id": 1}
############################################
### Delete Discussion by ID
############################################

145
web/dist/assets/index-1675ee15.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

8
web/dist/assets/index-b98d802a.css vendored Normal file

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

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

View File

@ -96,6 +96,30 @@ markdownIt.renderer.rules.link_open = (tokens, idx, options, env, self) => {
return self.renderToken(tokens, idx, options);
};
// Define a custom rendering function for lists
const renderList = (tokens, idx, options, env, self) => {
const token = tokens[idx];
const listType = token.attrGet('type') || 'ul'; // Default to unordered list
// Custom handling for unordered lists
if (listType === 'ul') {
// Add Tailwind CSS classes for unordered lists
return '<ul class="list-disc ml-4">' + self.renderToken(tokens, idx, options) + '</ul>';
}
// Custom handling for ordered lists
if (listType === 'ol') {
// Add Tailwind CSS classes for ordered lists
return '<ol class="list-decimal ml-4">' + self.renderToken(tokens, idx, options) + '</ol>';
}
// Fallback to the default renderer for other list types
return self.renderToken(tokens, idx, options);
};
// Override the default list renderer with the custom function
markdownIt.renderer.rules.bullet_list_open = renderList;
markdownIt.renderer.rules.ordered_list_open = renderList;