优化 markdown 解析
This commit is contained in:
parent
f50cdc47ab
commit
d0e46a3185
@ -107,15 +107,6 @@ export const templates: Template[] = [
|
||||
margin: '0 0 1em 0'
|
||||
},
|
||||
|
||||
// 引用内容
|
||||
blockquote_p: {
|
||||
'display': `block`,
|
||||
'fontSize': `1em`,
|
||||
'letterSpacing': `0.1em`,
|
||||
'color': `hsl(var(--foreground))`,
|
||||
},
|
||||
|
||||
|
||||
// 代码块
|
||||
code_pre: {
|
||||
'fontSize': `14px`,
|
||||
@ -159,11 +150,25 @@ export const templates: Template[] = [
|
||||
'color': `hsl(var(--foreground))`,
|
||||
},
|
||||
|
||||
figure: {
|
||||
margin: `1.5em 8px`,
|
||||
color: `hsl(var(--foreground))`,
|
||||
table: {
|
||||
textAlign: 'center',
|
||||
margin: '1em 8px',
|
||||
color: 'hsl(var(--foreground))'
|
||||
},
|
||||
|
||||
thead: {
|
||||
'background': `rgba(0, 0, 0, 0.05)`,
|
||||
'fontWeight': `bold`,
|
||||
'color': `hsl(var(--foreground))`,
|
||||
},
|
||||
|
||||
td: {
|
||||
border: '1px solid #dfdfdf',
|
||||
padding: '0.25em 0.5em',
|
||||
color: '#3f3f3f',
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
inline: {
|
||||
listitem: {
|
||||
@ -190,10 +195,6 @@ export const templates: Template[] = [
|
||||
color: `#576b95`,
|
||||
},
|
||||
|
||||
wx_link: {
|
||||
'color': `#576b95`,
|
||||
'textDecoration': `none`,
|
||||
},
|
||||
|
||||
// 字体加粗样式
|
||||
strong: {
|
||||
@ -202,33 +203,9 @@ export const templates: Template[] = [
|
||||
'fontSize': `inherit`,
|
||||
},
|
||||
|
||||
table: {
|
||||
textAlign: 'center',
|
||||
margin: '1em 8px',
|
||||
color: 'hsl(var(--foreground))'
|
||||
},
|
||||
|
||||
thead: {
|
||||
'background': `rgba(0, 0, 0, 0.05)`,
|
||||
'fontWeight': `bold`,
|
||||
'color': `hsl(var(--foreground))`,
|
||||
},
|
||||
|
||||
td: {
|
||||
border: '1px solid #dfdfdf',
|
||||
padding: '0.25em 0.5em',
|
||||
color: '#3f3f3f',
|
||||
},
|
||||
|
||||
footnote: {
|
||||
'fontSize': `12px`,
|
||||
'color': `hsl(var(--foreground))`,
|
||||
},
|
||||
|
||||
figcaption: {
|
||||
'textAlign': `center`,
|
||||
'color': `#888`,
|
||||
'fontSize': `0.8em`,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -101,12 +101,14 @@ export interface RendererOptions {
|
||||
p?: StyleOptions
|
||||
blockquote?: StyleOptions
|
||||
code_pre?: StyleOptions
|
||||
code?: StyleOptions
|
||||
image?: StyleOptions
|
||||
ul?: StyleOptions
|
||||
ol?: StyleOptions
|
||||
table?: StyleOptions
|
||||
th?: StyleOptions
|
||||
td?: StyleOptions
|
||||
thead?: StyleOptions
|
||||
footnotes?: StyleOptions
|
||||
}
|
||||
inline?: {
|
||||
|
Loading…
Reference in New Issue
Block a user