File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212#### Changed
1313- CHANGELOG now adheres to the [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) format.
1414
15+ ## [ 3.8.0] - 2024-05-31
1516
1617# freeRASP 3.8.0
1718
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ const filePath = './CHANGELOG.md';
55const fileContent = fs . readFileSync ( filePath , 'utf-8' ) ;
66
77const trimmedContent = fileContent
8- . replace ( / \s * # \s * f r e e R A S P .* / , '' ) // trim the latest version header
9- . replace ( / \s * # \s * f r e e R A S P ( [ \s \S ] ) * / , '' ) // trim everything after the latest changelog data
8+ . replace ( / ( [ \s \S ] * ?) \s * (? = \s * # # ) / , '' ) // trim the # Changelog part
9+ . replace ( / \s * # # \s * \[ \d + \. \d + \. \d + \] - \d { 4 } - \d { 2 } - \d { 2 } .* / , '' ) // trim the latest version header
10+ . replace ( / \s * # # \s * \[ \d + \. \d + \. \d + \] - \d { 4 } - \d { 2 } - \d { 2 } ( [ \s \S ] ) * / , '' ) // trim everything after the latest changelog data
1011 . trim ( ) ; // trim leading and trailing whitespaces
1112
1213console . log ( trimmedContent ) ;
You can’t perform that action at this time.
0 commit comments