File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ const options: Options = {
4141 try {
4242 // Configure marked renderer to add target="_blank" to links
4343 const renderer = {
44+ strong ( token : Tokens . Strong ) {
45+ if ( token . raw . startsWith ( '**' ) ) {
46+ return `<strong class="asterisk-emphasis">${ token . text } </strong>`
47+ } else if ( token . raw . startsWith ( '__' ) ) {
48+ return `<strong class="underscore-emphasis">${ token . text } </strong>`
49+ }
50+ return `<strong>${ token . text } </strong>`
51+ } ,
4452 link ( token : Tokens . Link ) {
4553 const href = token . href || ''
4654 const title = token . title ? ` title="${ token . title } "` : ''
@@ -121,6 +129,7 @@ const options: Options = {
121129let mind = new MindElixir ( options )
122130
123131const data = MindElixir . new ( 'new topic' )
132+ // example.theme = MindElixir.DARK_THEME
124133mind . init ( example )
125134
126135const m2 = new MindElixir ( {
Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ const aboutMindElixir: MindElixirDataWithUseMd = {
448448 useMd : true ,
449449 } ,
450450 {
451- topic : '**Bold text** and *italic text* and ***bold italic** *' ,
451+ topic : '**Bold text** and __Highlight__ and *italic text *' ,
452452 id : 'markdown-emphasis' ,
453453 useMd : true ,
454454 } ,
Original file line number Diff line number Diff line change 3737 font-style : italic;
3838}
3939
40- .map-container strong ,
40+ .map-container strong . asterisk-emphasis ,
4141.map-container em {
4242 color : var (--selected );
4343}
44+ .map-container strong .underscore-emphasis {
45+ background : rgba (255 , 235 , 59 , 0.25 ); /* 可改颜色/透明度 */
46+ padding : 0.05em 0.15em ;
47+ border-radius : 0.15em ;
48+ }
4449
4550.map-container a {
4651 color : var (--selected );
You can’t perform that action at this time.
0 commit comments