Skip to content

Commit

Permalink
Fix mistake in minifying cached data files
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Jun 28, 2023
1 parent 50c1c51 commit 8ce5a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/download-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function writeFile(filename: string) {
const fileDataMin = fileData
// Convert /x flag
.replace(/(\s+|^)#.*/g, '') // remove comments
.replace(/: \|.*\n((\s+).+\n(\2.+\n)+)/g, (_, content) => `: '${content.replace(/^\s+|\s+$|\r?\n/gm, '')}'\n`) // flatten multi-line data
.replace(/(pattern: )\|.*\n((\s+).+\n(\2.+\n)+)/g, (_, pref, content) => `${pref}'${content.replace(/^\s+|\s+$|\r?\n/gm, '')}'\n`) // flatten multi-line data
.replace('(?x)', '')
fs.promises.writeFile(filePath, fileDataMin)
.then(() => console.log(`Successfully wrote ${filename}.`))
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## Next
- Fixed cached data files having formatting issues.

## 2.5.5
*2023-06-25*
- Fixed a crash occurring when parsing heuristics with negative inline PCRE flags.
Expand Down

0 comments on commit 8ce5a87

Please sign in to comment.