refactor(extension-youtube): rename utility function name (#3498)

This commit is contained in:
Sven Adlung 2022-12-07 00:45:51 +01:00 committed by GitHub
parent e9d9d88511
commit 8b854b67a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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<YoutubeOptions>({
},
renderHTML({ HTMLAttributes }) {
const embedUrl = getEmbedURLFromYoutubeURL({
const embedUrl = getEmbedUrlFromYoutubeUrl({
url: HTMLAttributes.src,
allowFullscreen: this.options.allowFullscreen,
autoplay: this.options.autoplay,