File tree Expand file tree Collapse file tree 5 files changed +54
-1
lines changed
Expand file tree Collapse file tree 5 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " cf2md " : patch
3+ ---
4+
5+ fix: fix <br /> and space in strong temporarily
Original file line number Diff line number Diff line change 1- import type { Element } from 'hast'
1+ import type { Content , Element } from 'hast'
22import { isElement } from 'hast-util-is-element'
33import type { Paragraph , Strong , Text } from 'mdast'
44import type { BlockContent , ContainerDirective } from 'mdast-util-directive'
@@ -20,6 +20,9 @@ const processor = unified()
2020 . use ( remarkGfm )
2121 . use ( rehypeRemark , {
2222 handlers : {
23+ br ( h , node : Content ) {
24+ return h ( node , 'html' , '<br>' )
25+ } ,
2326 div ( h , node : Element ) {
2427 const classList = getClassList ( node )
2528
@@ -123,6 +126,15 @@ const processor = unified()
123126 }
124127 : codeNode
125128 } ,
129+ strong ( h , node : Element ) {
130+ const strongNode = defaultHandlers . strong ( h , node ) as Strong
131+ for ( const child of strongNode . children ) {
132+ if ( child . type === 'text' ) {
133+ child . value = child . value . trim ( )
134+ }
135+ }
136+ return strongNode
137+ } ,
126138 } ,
127139 } )
128140 . use ( remarkStringify , {
Original file line number Diff line number Diff line change @@ -73,6 +73,16 @@ cp /etc/kubernetes/manifests/kube-apiserver.yaml ./kube-apiserver.yaml_backup
7373
7474经验是……
7575
76+ 1. 参考以下说明,配置关键参数。
77+
78+ <br >
79+
80+ * **添加告警规则**,并设置 **告警规则**相关参数:
81+
82+ <br >
83+
84+ * **告警类型** 选择 **自定义告警。**
85+
7686\\\\-end-
7787"
7888`;
Original file line number Diff line number Diff line change @@ -232,4 +232,20 @@ <h3 id="早睡"><a href="#早睡">早睡</a></h3>
232232</ style >
233233< p > < br /> </ p >
234234< p > < br /> </ p >
235+
236+ < ol >
237+ < li >
238+ 参考以下说明,配置关键参数。< br />
239+ < ul >
240+ < li >
241+ < strong > 添加告警规则</ strong > ,并设置
242+ < strong > 告警规则 </ strong > 相关参数:< br />
243+ < ul >
244+ < li > < strong > 告警类型</ strong > 选择 < strong > 自定义告警。</ strong > </ li >
245+ </ ul >
246+ </ li >
247+ </ ul >
248+ </ li >
249+ </ ol >
250+
235251< p > -end-</ p >
Original file line number Diff line number Diff line change @@ -70,4 +70,14 @@ cp /etc/kubernetes/manifests/kube-apiserver.yaml ./kube-apiserver.yaml_backup
7070
7171经验是……
7272
73+ 1 . 参考以下说明,配置关键参数。
74+
75+ <br >
76+
77+ * ** 添加告警规则** ,并设置 ** 告警规则** 相关参数:
78+
79+ <br >
80+
81+ * ** 告警类型** 选择 ** 自定义告警。**
82+
7383\- end-
You can’t perform that action at this time.
0 commit comments