♻️ (app)
This commit is contained in:
@@ -15,7 +15,8 @@ export const markdownItPlugin = (
|
||||
|
||||
const regexp = RegExp('^' + regex.source, flags)
|
||||
|
||||
const parse = (state: any, silent: boolean) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const parse = (state: any, silent: boolean): boolean => {
|
||||
const match = regexp.exec(state.src.slice(state.pos))
|
||||
|
||||
if (!match) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { markdownItPlugin } from '@/utils/markdown/markdown-it-regexp'
|
||||
export const twitterPlugin = markdownItPlugin(
|
||||
/@\[tweet]\((.*?)\)/g,
|
||||
(matches: RegExpExecArray[]) => {
|
||||
const [_, tweetId] = matches
|
||||
const [, tweetId] = matches
|
||||
|
||||
return `<span id="tweet-${tweetId}" data-tweet-id="${tweetId}" class="markdown-tweet"></span>`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user