File tree 2 files changed +8
-3
lines changed
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 }) {
104
104
nodes . slice ( 0 , i ) . every ( ( node ) => node . type === 'list' )
105
105
) {
106
106
const text = textJoin ( node . children [ 0 ] . children , file ) ;
107
- const stability = text . match ( stabilityExpr ) ;
107
+ const stability = stabilityExpr . exec ( text ) ;
108
108
if ( stability ) {
109
109
current . stability = parseInt ( stability [ 1 ] , 10 ) ;
110
- current . stabilityText = stability [ 2 ] . trim ( ) ;
110
+ current . stabilityText = stability [ 2 ] . replaceAll ( '\n' , ' ' ) . trim ( ) ;
111
111
delete nodes [ i ] ;
112
112
}
113
113
}
Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ function collectStability(data) {
30
30
if ( mod . displayName && mod . stability >= 0 ) {
31
31
const link = mod . source . replace ( 'doc/api/' , '' ) . replace ( '.md' , '.html' ) ;
32
32
33
+ let { stabilityText } = mod ;
34
+ if ( stabilityText . includes ( '. ' ) ) {
35
+ stabilityText = stabilityText . slice ( 0 , stabilityText . indexOf ( '.' ) ) ;
36
+ }
37
+
33
38
stability . push ( {
34
39
api : mod . name ,
35
40
displayName : mod . textRaw ,
36
41
link : link ,
37
42
stability : mod . stability ,
38
- stabilityText : `(${ mod . stability } ) ${ mod . stabilityText } ` ,
43
+ stabilityText : `(${ mod . stability } ) ${ stabilityText } ` ,
39
44
} ) ;
40
45
}
41
46
}
You can’t perform that action at this time.
0 commit comments