forked from mxx1111/mdlook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectorMapping.ts
More file actions
110 lines (100 loc) · 4 KB
/
Copy pathselectorMapping.ts
File metadata and controls
110 lines (100 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/**
* CSS 选择器映射表
* 将旧的自定义选择器映射到新的规范类名(kebab-case)
* 实现向后兼容
*/
/**
* 选择器映射表
* 旧选择器 → 新类名
*/
export const SELECTOR_MAPPING: Record<string, string> = {
// GFM Alert 相关
blockquote_note: `markdown-alert-note`,
blockquote_tip: `markdown-alert-tip`,
blockquote_info: `markdown-alert-info`,
blockquote_important: `markdown-alert-important`,
blockquote_warning: `markdown-alert-warning`,
blockquote_caution: `markdown-alert-caution`,
// Obsidian-style Callouts
blockquote_abstract: `markdown-alert-abstract`,
blockquote_summary: `markdown-alert-summary`,
blockquote_tldr: `markdown-alert-tldr`,
blockquote_todo: `markdown-alert-todo`,
blockquote_success: `markdown-alert-success`,
blockquote_done: `markdown-alert-done`,
blockquote_question: `markdown-alert-question`,
blockquote_help: `markdown-alert-help`,
blockquote_faq: `markdown-alert-faq`,
blockquote_failure: `markdown-alert-failure`,
blockquote_fail: `markdown-alert-fail`,
blockquote_missing: `markdown-alert-missing`,
blockquote_danger: `markdown-alert-danger`,
blockquote_error: `markdown-alert-error`,
blockquote_bug: `markdown-alert-bug`,
blockquote_example: `markdown-alert-example`,
blockquote_quote: `markdown-alert-quote`,
blockquote_cite: `markdown-alert-cite`,
blockquote_title: `alert-title`,
blockquote_title_note: `alert-title-note`,
blockquote_title_tip: `alert-title-tip`,
blockquote_title_info: `alert-title-info`,
blockquote_title_important: `alert-title-important`,
blockquote_title_warning: `alert-title-warning`,
blockquote_title_caution: `alert-title-caution`,
// Obsidian-style Callout titles
blockquote_title_abstract: `alert-title-abstract`,
blockquote_title_summary: `alert-title-summary`,
blockquote_title_tldr: `alert-title-tldr`,
blockquote_title_todo: `alert-title-todo`,
blockquote_title_success: `alert-title-success`,
blockquote_title_done: `alert-title-done`,
blockquote_title_question: `alert-title-question`,
blockquote_title_help: `alert-title-help`,
blockquote_title_faq: `alert-title-faq`,
blockquote_title_failure: `alert-title-failure`,
blockquote_title_fail: `alert-title-fail`,
blockquote_title_missing: `alert-title-missing`,
blockquote_title_danger: `alert-title-danger`,
blockquote_title_error: `alert-title-error`,
blockquote_title_bug: `alert-title-bug`,
blockquote_title_example: `alert-title-example`,
blockquote_title_quote: `alert-title-quote`,
blockquote_title_cite: `alert-title-cite`,
blockquote_p: `alert-content`,
blockquote_p_note: `alert-content-note`,
blockquote_p_tip: `alert-content-tip`,
blockquote_p_info: `alert-content-info`,
blockquote_p_important: `alert-content-important`,
blockquote_p_warning: `alert-content-warning`,
blockquote_p_caution: `alert-content-caution`,
// Obsidian-style Callout content
blockquote_p_abstract: `alert-content-abstract`,
blockquote_p_summary: `alert-content-summary`,
blockquote_p_tldr: `alert-content-tldr`,
blockquote_p_todo: `alert-content-todo`,
blockquote_p_success: `alert-content-success`,
blockquote_p_done: `alert-content-done`,
blockquote_p_question: `alert-content-question`,
blockquote_p_help: `alert-content-help`,
blockquote_p_faq: `alert-content-faq`,
blockquote_p_failure: `alert-content-failure`,
blockquote_p_fail: `alert-content-fail`,
blockquote_p_missing: `alert-content-missing`,
blockquote_p_danger: `alert-content-danger`,
blockquote_p_error: `alert-content-error`,
blockquote_p_bug: `alert-content-bug`,
blockquote_p_example: `alert-content-example`,
blockquote_p_quote: `alert-content-quote`,
blockquote_p_cite: `alert-content-cite`,
// 代码相关
code_pre: `code-block`,
codespan: `code-inline`,
// KaTeX 公式
inline_katex: `katex-inline`,
block_katex: `katex-block`,
// Markup 标记
markup_highlight: `markup-highlight`,
markup_underline: `markup-underline`,
markup_wavyline: `markup-wavyline`,
listitem: `listitem`,
}