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