gita / gita-frontend-v2

Frontend for BhagavadGita.io v2
https://bhagavadgita.io
MIT License
43 stars 53 forks source link

Remove grouping in splitIntoParagraphs() regex #215

Closed elmeister closed 1 year ago

elmeister commented 1 year ago

Safari doesn't support lookbehind

Summary by CodeRabbit

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bg-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 11:31am
bhagavad-gita ✅ Ready (Inspect) Visit Preview Sep 6, 2023 11:31am
github-actions[bot] commented 1 year ago

Image description CodeRabbit

Walkthrough

The change is focused on the splitIntoParagraphs function in the src/utils/splitIntoParagraphs.ts file. The regular expression used for splitting paragraphs has been simplified, removing the grouping and lookbehind feature, and now uses a simple space character instead.

Changes

File Summary
src/utils/splitIntoParagraphs.ts The regular expression used in the splitIntoParagraphs function has been replaced with a simple space character, removing the grouping and lookbehind feature from the regex.

🐰 "In the land of code, where logic intertwines, A rabbit hopped and tweaked some lines. No more complex regex to parse, Just a space, oh how sparse! Celebrate this change, as simplicity shines! 🎉"


Uplevel your code reviews with CodeRabbit Pro ### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.