Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tldraw regex to detect both x.com AND twitter.com urls to preserve embed capabilities #11321

Merged
merged 3 commits into from
May 24, 2024

Conversation

mattmazzola
Copy link
Contributor

@mattmazzola mattmazzola commented May 19, 2024

Issue

After X.com changed their urls to default to x.com instead of twitter.com the code stopped detecting pasted urls
See issue #11319

Solution

  • Update TWITTER_REGEX to X_OR_TWITTER_REGEX to now recognize both urls
    See Regex debugger
    image

  • All add new E2E test for x.com urls based on copy of existing twitter.com test

Other Notes

Given my inexperience with LogSeq PR's and some maintainer might want to take this over.
I thought it would be simple one to fix though and an opportunity to help 😅

Closes #1139

@CLAassistant
Copy link

CLAassistant commented May 19, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@andelf andelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andelf
Copy link
Collaborator

andelf commented May 24, 2024

e2e tests fail. I'll check it.

1) whiteboards.spec.ts:349:5 › copy/paste twitter status url to create a Tweet shape ─────────────
    Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)

@andelf andelf merged commit 3391a9a into logseq:master May 24, 2024
13 checks passed
@mattmazzola mattmazzola deleted the mattm/twitter-or-x-regex branch May 27, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants