File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,10 @@ export function jsonAPI({ filename }) {
104104 nodes . slice ( 0 , i ) . every ( ( node ) => node . type === 'list' )
105105 ) {
106106 const text = textJoin ( node . children [ 0 ] . children , file ) ;
107- const stability = text . match ( stabilityExpr ) ;
107+ const stability = stabilityExpr . exec ( text ) ;
108108 if ( stability ) {
109109 current . stability = parseInt ( stability [ 1 ] , 10 ) ;
110- current . stabilityText = stability [ 2 ] . trim ( ) ;
110+ current . stabilityText = stability [ 2 ] . replaceAll ( '\n' , ' ' ) . trim ( ) ;
111111 delete nodes [ i ] ;
112112 }
113113 }
Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ function collectStability(data) {
3030 if ( mod . displayName && mod . stability >= 0 ) {
3131 const link = mod . source . replace ( 'doc/api/' , '' ) . replace ( '.md' , '.html' ) ;
3232
33+ let { stabilityText } = mod ;
34+ if ( stabilityText . includes ( '. ' ) ) {
35+ stabilityText = stabilityText . slice ( 0 , stabilityText . indexOf ( '.' ) ) ;
36+ }
37+
3338 stability . push ( {
3439 api : mod . name ,
3540 displayName : mod . textRaw ,
3641 link : link ,
3742 stability : mod . stability ,
38- stabilityText : `(${ mod . stability } ) ${ mod . stabilityText } ` ,
43+ stabilityText : `(${ mod . stability } ) ${ stabilityText } ` ,
3944 } ) ;
4045 }
4146 }
You can’t perform that action at this time.
0 commit comments