File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -332,16 +332,18 @@ class ReleasePreparation {
332
332
const arr = data . split ( '\n' ) ;
333
333
334
334
const major = versionComponents . major ;
335
- const hrefLink = `doc/changelogs/CHANGELOG\\_V${ major } .md` ;
335
+ const hrefLink = `doc/changelogs/CHANGELOG_V${ major } .md` ;
336
+ const escapedHrefLink = hrefLink . replace ( / _ / g, '\\_' ) ;
336
337
const newRefLink = `<a href="${ hrefLink } #${ newVersion } ">${ newVersion } </a>` ;
337
338
const lastRefLink = `<a href="${ hrefLink } #${ lastRef } ">${ lastRef } </a>` ;
338
339
339
340
for ( let idx = 0 ; idx < arr . length ; idx ++ ) {
340
341
if ( isLTSTransition ) {
341
- if ( arr [ idx ] . includes ( hrefLink ) ) {
342
+ if ( arr [ idx ] . includes ( escapedHrefLink ) ) {
343
+ arr [ idx ] = arr [ idx ] . replace ( '**Current**' , '**Long Term Support**' ) ;
344
+ } else if ( arr [ idx ] . includes ( hrefLink ) ) {
342
345
const eolDate = getEOLDate ( date ) ;
343
346
const eol = eolDate . toISOString ( ) . split ( '-' ) . slice ( 0 , 2 ) . join ( '-' ) ;
344
- arr [ idx ] = arr [ idx ] . replace ( '**Current**' , '**Long Term Support**' ) ;
345
347
arr [ idx ] = arr [ idx ] . replace ( '"Current"' , `"LTS Until ${ eol } "` ) ;
346
348
arr [ idx ] = arr [ idx ] . replace ( '<sup>Current</sup>' , '<sup>LTS</sup>' ) ;
347
349
} else if ( arr [ idx ] . includes ( '**Long Term Support**' ) ) {
You can’t perform that action at this time.
0 commit comments