Skip to content

Commit 5ab08f4

Browse files
authored
fix: mapping listitem (#1134)
1 parent 09bc9b5 commit 5ab08f4

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

apps/web/src/stores/cssEditor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export const useCssEditorStore = defineStore(`cssEditor`, () => {
152152

153153
// 创建 CSS 编辑器的容器
154154
const cssContainer = document.createElement(`div`)
155+
cssContainer.className = 'w-full h-full'
155156
cssEditorDom.parentNode?.replaceChild(cssContainer, cssEditorDom)
156157

157158
// 创建主题 Compartment 用于动态切换

packages/core/src/renderer/renderer-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function initRenderer(opts: IOpts = {}): RendererAPI {
128128
*/
129129
function styledContent(styleLabel: string, content: string, tagName?: string): string {
130130
const tag = tagName ?? styleLabel
131-
const className = `md-${styleLabel.replace(/_/g, `-`)}`
131+
const className = `${styleLabel.replace(/_/g, `-`)}`
132132
const headingAttr = /^h\d$/.test(tag) ? ` data-heading="true"` : ``
133133
return `<${tag} class="${className}"${headingAttr}>${content}</${tag}>`
134134
}

packages/core/src/theme/selectorMapping.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,5 @@ export const SELECTOR_MAPPING: Record<string, string> = {
4646
markup_underline: `markup-underline`,
4747
markup_wavyline: `markup-wavyline`,
4848

49-
// 其他
50-
listitem: `list-item`,
51-
figcaption: `figure-caption`,
52-
wx_link: `weixin-link`,
49+
listitem: `listitem`,
5350
}

packages/core/src/theme/themeApplicator.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ export async function applyTheme(config: ThemeConfig): Promise<void> {
5454
// 7. 使用 PostCSS 处理 CSS(简化 calc() 表达式等)
5555
mergedCSS = await processCSS(mergedCSS)
5656

57-
console.log(mergedCSS, 'mergedCSS')
58-
5957
// 8. 注入到页面
6058
const injector = getThemeInjector()
6159
injector.inject(mergedCSS)

0 commit comments

Comments
 (0)