From 270139470da3d1121741734536c9822e666e0a1f Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:49:19 +0200 Subject: [PATCH 1/6] Update regex from main repo code --- .../assets/js/removeExtraParagraphSpacing.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index fabfa205b..73f9a696c 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -1,20 +1,20 @@ function removeExtraParagraphSpacing(html) { return html .replace(/(?: \s*|[\u200b]\s*)+(?=<\/?p[> ])/g, '') - .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex - .replace( - /
\s*
[^]+/, - _ => - `${ - /\/p>/.test(_) - ? _.replace( - /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p\b[^>]*>
\s*
))\s*/g, - '', - ) - : _ - }`, - ) //if p found, delete all double br near p - .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p\b[^>]*>(?:<[^>]+>)*\s*
))\s*/g, ''); + .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex + .replace( + /
\s*
[^]+/, + _ => + `${ + /\/p>/.test(_) + ? _.replace( + /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, + '', + ) + : _ + }`, + ) //if p found, delete all double br near p + .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); } // WebView global From 1ec54a6ccf1a0ea6a02889cbe6dd8ee9bbbc3bf6 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:51:30 +0200 Subject: [PATCH 2/6] lint f --- .../assets/js/removeExtraParagraphSpacing.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index 73f9a696c..fe26364f5 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -2,19 +2,19 @@ function removeExtraParagraphSpacing(html) { return html .replace(/(?: \s*|[\u200b]\s*)+(?=<\/?p[> ])/g, '') .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex - .replace( - /
\s*
[^]+/, - _ => - `${ - /\/p>/.test(_) - ? _.replace( - /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, - '', - ) - : _ - }`, - ) //if p found, delete all double br near p - .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); + .replace( + /
\s*
[^]+/, + _ => + `${ + /\/p>/.test(_) + ? _.replace( + /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, + '', + ) + : _ + }`, + ) //if p found, delete all double br near p + .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); } // WebView global From b151f09bf1ddc7f853f8de147512a56635b66840 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:53:22 +0200 Subject: [PATCH 3/6] Update removeExtraParagraphSpacing.js --- .../app/src/main/assets/js/removeExtraParagraphSpacing.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index fe26364f5..c0b0e0a80 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -1,12 +1,12 @@ function removeExtraParagraphSpacing(html) { return html .replace(/(?: \s*|[\u200b]\s*)+(?=<\/?p[> ])/g, '') - .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex + .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex .replace( - /
\s*
[^]+/, - _ => + /
\s*
[^]+/, + _ => `${ - /\/p>/.test(_) + /\/p>/.test(_) ? _.replace( /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, '', From d334ecefa6cacadd982154f02d456967ac424973 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:54:55 +0200 Subject: [PATCH 4/6] lint --- .../app/src/main/assets/js/removeExtraParagraphSpacing.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index c0b0e0a80..80c1cbc45 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -3,12 +3,12 @@ function removeExtraParagraphSpacing(html) { .replace(/(?: \s*|[\u200b]\s*)+(?=<\/?p[> ])/g, '') .replace(/
\s*
\s*(?:
\s*)+/g, '

') //force max 2 consecutive
, chaining regex .replace( - /
\s*
[^]+/, + /
\s*
[^]+/, _ => `${ - /\/p>/.test(_) + /\/p>/.test(_) ? _.replace( - /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, + /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, '', ) : _ From 30b3f3a75022a1eabe562441bc7eef3e887fff50 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:56:14 +0200 Subject: [PATCH 5/6] lintt --- .../app/src/main/assets/js/removeExtraParagraphSpacing.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index 80c1cbc45..dad942161 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -8,13 +8,13 @@ function removeExtraParagraphSpacing(html) { `${ /\/p>/.test(_) ? _.replace( - /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, + /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, '', - ) + ) : _ }`, - ) //if p found, delete all double br near p - .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); + ) //if p found, delete all double br near p + .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); } // WebView global From 40345347e066bc322cbaaa7898f506161b309244 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:57:15 +0200 Subject: [PATCH 6/6] linnn --- .../app/src/main/assets/js/removeExtraParagraphSpacing.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js index dad942161..2158fd829 100644 --- a/android/app/src/main/assets/js/removeExtraParagraphSpacing.js +++ b/android/app/src/main/assets/js/removeExtraParagraphSpacing.js @@ -10,11 +10,11 @@ function removeExtraParagraphSpacing(html) { ? _.replace( /
\s*
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)
\s*
))\s*/g, '', - ) + ) : _ }`, - ) //if p found, delete all double br near p - .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); + ) //if p found, delete all double br near p + .replace(/
(?:(?=\s*<\/?p[> ])|(?<=<\/?p(?:>| [^>]+>)(?:<[^>]+>)*\s*
))\s*/g, ''); } // WebView global