Safari doesn't support lookbehind #6
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: KaKi87/scraper-instagram-v1#6
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
for detecting hastags you use regular expeession
but Safari doesn't support lookbehind yet (that is, your (?<=[\s>]))
https://caniuse.com/js-regexp-lookbehind
Although I can't remember where I found this regular expression, I must have found it on a specialized forum topic, blog post or similar project, providing some guarantee that it would always work the same way Instagram does and never trigger false positives.
If you shall come up with a viable replacement providing support for Safari web browser while preserving that guarantee, I will change it.
Thanks.
Unfortunately I'm not that good at regex, I tried to find something suitable but could not find
Since the Instagram front-end itself transforms hashtags into links, I'll try to find out if they're either using a regular expression on their front-end, or computing it in the back-end and providing the result through their API.
In any case, I'll try to use replace my own implementation by theirs.