Skip to content

Commit

Permalink
faster regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Palloxin authored Sep 5, 2024
1 parent 858a94b commit fd4c1a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/app/src/main/assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ window.addEventListener('DOMContentLoaded', async () => {

if (reader.generalSettings.val.removeExtraParagraphSpacing) {
html = html
.replace(/(&nbsp;)(?<=<p[^>]*>\s*\1)/g, '')
.replace(/(?:&nbsp;\s*)+(?=<\/?p[^>]*>)/g, '')
.replace(/(?:<br>\s*)+(?=<br>\s*<br>)/g, '')
.replace(
/(?:<br>\s*<\/?br>\s*)+(?:(?=<)|(?<=>\s*<br>\s*<\/?br>\s*))/g,
Expand Down

0 comments on commit fd4c1a8

Please sign in to comment.