Skip to content

Commit

Permalink
fix: markdownToHtml error
Browse files Browse the repository at this point in the history
  • Loading branch information
KUN1007 committed Nov 3, 2024
1 parent b864ce1 commit 77f5035
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
27 changes: 10 additions & 17 deletions assets/css/editor/kun-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,24 +132,17 @@

table {
border: 1px solid var(--kungalgame-blue-5);
border-radius: 5px;
white-space: nowrap;
}

th,
td {
border: 1px solid var(--kungalgame-blue-5);
padding: 3px;
text-align: left;
}
white-space: pre-wrap;

tr:nth-child(even) {
background-color: var(--kungalgame-trans-blue-1);
}
th,
td {
border: 1px solid var(--kungalgame-blue-5);
padding: 3px;
text-align: left;
}

.tableWrapper {
color: var(--kungalgame-font-color-3);
position: relative;
overflow-x: auto;
tr:nth-child(even) {
background-color: var(--kungalgame-trans-blue-1);
}
}
}
2 changes: 1 addition & 1 deletion components/kun/utils/handleFileChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const resizeImage = (
ctx?.drawImage(image, 0, 0, newWidth, newHeight)
const resizedFile = dataURItoBlob(canvas.toDataURL('image/webp', 0.77))

if (resizedFile.size > 1007 * 1024) {
if (resizedFile.size > 1.007 * 1024 * 1024) {
useMessage(10112, 'warn')
reject(new Error('Image is too large.'))
} else {
Expand Down
2 changes: 1 addition & 1 deletion server/utils/markdownToHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const markdownToHtml = async (markdown: string) => {
.use(rehypeSanitize)
.use(remarkFrontmatter)
.use(remarkGfm)
.use(rehypePrism)
.use(rehypePrism, { ignoreMissing: true })
.use(rehypeStringify)
.process(markdown)

Expand Down

0 comments on commit 77f5035

Please sign in to comment.