Skip to content

feat: add vimeo video embed block command - #1420

Merged
tiensonqin merged 1 commit into
logseq:masterfrom
cfebs:vimeo-block
Mar 10, 2021
Merged

tiensonqin merged 1 commit into
logseq:masterfrom
cfebs:vimeo-block

Conversation

@cfebs

@cfebs cfebs commented Mar 7, 2021

Copy link
Copy Markdown
Contributor

Adds /vimeo & {{vimeo }}

image

Regex should match:

https://vimeo.com/48510638
https://player.vimeo.com/video/48510638
vimeo.com/48510638
player.vimeo.com/video/48510638
48510638

I didn't see a good existing place to add tests, happy to do that with some guidance.

@tiensonqin

Copy link
Copy Markdown
Contributor

@cfebs Thank you very much, so happy that I can embed Vimeo videos now.

I didn't see a good existing place to add tests, happy to do that with some guidance.

You can add some regex tests in https://github.com/logseq/logseq/blob/master/src/test/frontend/text_test.cljs, there're several examples. You can run yarn test to check whether it works.
Let me know if there's something else I can help with.

@tiensonqin

Copy link
Copy Markdown
Contributor

@cfebs I just give it some tests and it works correctly, I'll merge this PR, you can create another PR with tests when you have some time.

@tiensonqin
tiensonqin merged commit dfb0ff6 into logseq:master Mar 10, 2021
@grand-lotus-iroh

Copy link
Copy Markdown

This is awesome! May you please add another command for local video file such as mp4... so type /mp4 and it shows option to browse PC for file>? or update the /video command so I can embed local?

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.

3 participants