Skip to content

Commit

Permalink
fix(sec): remove inefficient regular expression #357
Browse files Browse the repository at this point in the history
Changes to be committed:
modified:   template/scripts/generateDocs.js
  • Loading branch information
blackfalcon committed May 9, 2023
1 parent 568016e commit c726423
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion template/scripts/generateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function formatTemplateFileContents(content, destination) {
result = result.replace(/>(\r\n|\r|\n){2,}/g, '>\r\n'); // Remove empty lines directly after a closing html tag.
result = result.replace(/>(\r\n|\r|\n)```/g, '>\r\n\r\n```'); // Ensure an empty line before code samples.
result = result.replace(/>(\r\n|\r|\n){2,}```(\r\n|\r|\n)/g, '>\r\n```\r\n'); // Ensure no empty lines before close of code sample.
result = result.replace(/([^(\r\n|\r|\n)])(\r\n|\r|\n)+#/g, "$1\r\n\r\n#"); // Ensure empty line before header sections.

/**
* Write the result to the destination file
Expand Down

0 comments on commit c726423

Please sign in to comment.