From 0dc781559981090ae298e233bf53c25540582092 Mon Sep 17 00:00:00 2001 From: dongfang <1136005348@qq.com> Date: Fri, 6 Jan 2023 12:36:43 +0800 Subject: [PATCH] fix: missing css code in demo code preview (#39471) * fix: missing demo style in windows * fix: missing css code in demo preview * fix: change TabPane to tabs items * fix: change cn why-open url --- .../theme/builtins/Previewer/fromDumiProps.tsx | 3 +-- .dumi/theme/common/CodePreview.tsx | 18 +++++++++--------- .dumi/theme/plugin.ts | 2 +- components/dropdown/index.zh-CN.md | 4 ++-- components/tooltip/index.zh-CN.md | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/fromDumiProps.tsx b/.dumi/theme/builtins/Previewer/fromDumiProps.tsx index e0eb1151b612..0a5de19a3e85 100644 --- a/.dumi/theme/builtins/Previewer/fromDumiProps.tsx +++ b/.dumi/theme/builtins/Previewer/fromDumiProps.tsx @@ -86,8 +86,7 @@ export default function fromDumiProps
(
location,
src: demoUrl,
expand,
- // FIXME: confirm is there has any case?
- highlightedStyle: '',
+ highlightedStyle: meta.style ? Prism.highlight(meta.style, Prism.languages.css, 'css') : '',
} as P;
return