misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.95k stars 1.35k forks source link

fix: fix Invalid regular expression on iOS <= 16.3 #14560

Closed Ljzd-PRO closed 3 weeks ago

Ljzd-PRO commented 3 weeks ago

What

Use replaceAll instead of RegExp lookbehind assertion.

Why

RegExp Lookbehind Assertions are not supported on iOS 16.3 and below, the web app failed to load (ERROR CODE: APP_IMPORT), and throws an exception:

SyntaxError: Invalid regular expression: invalid group specifier name

Similar problem: https://github.com/misskey-dev/misskey/issues/10328#issuecomment-1905983698

Additional info (optional)

Checklist

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.36%. Comparing base (3bf63dd) to head (aa38c7f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14560 +/- ## ============================================ + Coverage 19.72% 41.36% +21.63% ============================================ Files 714 1540 +826 Lines 100375 196621 +96246 Branches 996 3568 +2572 ============================================ + Hits 19802 81324 +61522 - Misses 80030 114704 +34674 - Partials 543 593 +50 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

syuilo commented 3 weeks ago

@misskey-dev/dev iOS <= 16.3ってサポート対象だっけ

Sayamame-beans commented 3 weeks ago

前回見た時は16.3以上が動く感じだったようですが…今はどうでしょうか https://github.com/misskey-dev/misskey/issues/12875#issuecomment-1874909977

anatawa12 commented 3 weeks ago

私はiOS 16.x latestが対象と認識してるので対応しなくていいと認識してた

(browserlistとかを明示的に書いてちゃんとメンテしたほうがいいかも)

KisaragiEffective commented 3 weeks ago

これやるとメンテナンス性終わって悲しくなるので16.3以下は切って良さそう

syuilo commented 3 weeks ago

iOS <= 16.3 はサポート範囲外だったのでcloseします 🙏🏻