diff --git a/src/assets/example/theme-css.txt b/src/assets/example/theme-css.txt index 6613633..d1061c0 100644 --- a/src/assets/example/theme-css.txt +++ b/src/assets/example/theme-css.txt @@ -49,3 +49,6 @@ ul { /* 列表项样式 */ li { } +/* 代码块样式 */ +code { +} diff --git a/src/assets/scripts/util.js b/src/assets/scripts/util.js index 44b48f8..6f8f189 100644 --- a/src/assets/scripts/util.js +++ b/src/assets/scripts/util.js @@ -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(