Skip to content

Commit

Permalink
very minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Palloxin authored Sep 24, 2024
1 parent 4950bfd commit 7777fe9
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 @@ -467,7 +467,7 @@ window.addEventListener('DOMContentLoaded', async () => {
if (reader.generalSettings.val.removeExtraParagraphSpacing) {
html = html
.replace(/(?:&nbsp;\s*)+(?=<\/?p\b[^>]*>)/g, '')
.replace(/(?<=<br>\s*<br>\s*)(?:<br>\s*)+/g, '') //force max 2 consecutive <br>, chaining regex
.replace(/(?<=<br>\s*<br>)\s*(?:<br>\s*)+/g, '') //force max 2 consecutive <br>, chaining regex
.replace(
/<br>\s*<br>(?:(?=\s*<(?!em>|[iab]>|strong>|span>))|(?<=(?<!\/em|\/[iab]|\/strong|\/span)>\s*<br>\s*<br>))/g,
'',
Expand Down

0 comments on commit 7777fe9

Please sign in to comment.