From 8b854b67a4f093cde4684d4b055438111da55b9d Mon Sep 17 00:00:00 2001 From: Sven Adlung Date: Wed, 7 Dec 2022 00:45:51 +0100 Subject: [PATCH] refactor(extension-youtube): rename utility function name (#3498) --- packages/extension-youtube/src/utils.ts | 2 +- packages/extension-youtube/src/youtube.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/extension-youtube/src/utils.ts b/packages/extension-youtube/src/utils.ts index c9a6df0b2..b7dc23080 100644 --- a/packages/extension-youtube/src/utils.ts +++ b/packages/extension-youtube/src/utils.ts @@ -30,7 +30,7 @@ export const getYoutubeEmbedUrl = (nocookie?: boolean) => { return nocookie ? 'https://www.youtube-nocookie.com/embed/' : 'https://www.youtube.com/embed/' } -export const getEmbedURLFromYoutubeURL = (options: GetEmbedUrlOptions) => { +export const getEmbedUrlFromYoutubeUrl = (options: GetEmbedUrlOptions) => { const { url, allowFullscreen, diff --git a/packages/extension-youtube/src/youtube.ts b/packages/extension-youtube/src/youtube.ts index 625986b44..9566eb597 100644 --- a/packages/extension-youtube/src/youtube.ts +++ b/packages/extension-youtube/src/youtube.ts @@ -1,6 +1,6 @@ import { mergeAttributes, Node, nodePasteRule } from '@tiptap/core' -import { getEmbedURLFromYoutubeURL, isValidYoutubeUrl, YOUTUBE_REGEX_GLOBAL } from './utils' +import { getEmbedUrlFromYoutubeUrl, isValidYoutubeUrl, YOUTUBE_REGEX_GLOBAL } from './utils' export interface YoutubeOptions { addPasteHandler: boolean; @@ -133,7 +133,7 @@ export const Youtube = Node.create({ }, renderHTML({ HTMLAttributes }) { - const embedUrl = getEmbedURLFromYoutubeURL({ + const embedUrl = getEmbedUrlFromYoutubeUrl({ url: HTMLAttributes.src, allowFullscreen: this.options.allowFullscreen, autoplay: this.options.autoplay,