Skip to content

Commit

Permalink
feat: support custom code style (doocs#117)
Browse files Browse the repository at this point in the history
close doocs#117
  • Loading branch information
yanglbme committed Dec 20, 2021
1 parent f9b29a5 commit aa3c39f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/assets/example/theme-css.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ ul {
/* 列表项样式 */
li {
}
/* 代码块样式 */
code {
}
1 change: 1 addition & 0 deletions src/assets/scripts/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export function customCssWithTemplate(jsonString, color, theme) {
customTheme.block.h2 = Object.assign(customTheme.block.h2, jsonString.h2);
customTheme.block.h3 = Object.assign(customTheme.block.h3, jsonString.h3);
customTheme.block.h4 = Object.assign(customTheme.block.h4, jsonString.h4);
customTheme.block.code = Object.assign(customTheme.block.code, jsonString.code);
customTheme.block.p = Object.assign(customTheme.block.p, jsonString.p);
customTheme.block.hr = Object.assign(customTheme.block.hr, jsonString.hr);
customTheme.block.blockquote = Object.assign(
Expand Down

0 comments on commit aa3c39f

Please sign in to comment.