diggsweden / jitsi-outlook

A Jitsi plugin for outlook.
MIT License
5 stars 7 forks source link

26: Changed from .includes to regex #27

Closed Ayko1595 closed 1 year ago

Ayko1595 commented 1 year ago

Pull Request Template

Description

Please include a summary of the change and which issue is fixed or added. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #26

Checklist

janderssonse commented 1 year ago

Jamen, vi slöar till det och kollar med chatgpt vad regexpen gör också, bara för att se om jag tänkte rätt när jag tolkade den.

"Putting it all together, the regular expression /[.*+?^${}()|[\]\\]/g is used with the replace() method to find and replace any occurrences of the special characters . * + ? ^ $ { } ( ) | [ ] \. 
Each occurrence is replaced with the literal string \$&, where $& represents the matched substring. 
The purpose of this regular expression is to escape the special characters within the baseUrl string, ensuring that they are treated as literal characters rather than having their special meaning in regular expressions.". 

Hurra, chatgpt verkar ha svarat rätt för en gångs skull. Bara det:)

Ser bra ut vad jag kan se i övrigt, approve, men som sagt nu kikade jag bara, och har inte testat detta IRL med körning.