mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-14 20:11:22 +00:00
Remove unused function textMatcher
This commit is contained in:
parent
656cbbde0e
commit
dded49145a
@ -34,16 +34,6 @@ import { fileToBase64 } from '../../utils/fileReading/index.js';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
|
|
||||||
function textMatcher(doc, from) {
|
|
||||||
const textBeforeCursor = doc.textBetween(0, from, ' ', ' ');
|
|
||||||
const match = textBeforeCursor.match(/@[\w]*$/); // Match '@' followed by valid characters
|
|
||||||
if (!match) return null;
|
|
||||||
|
|
||||||
const start = from - match[0].length;
|
|
||||||
const query = match[0];
|
|
||||||
return { start, query };
|
|
||||||
}
|
|
||||||
|
|
||||||
const MenuBar = memo(
|
const MenuBar = memo(
|
||||||
({
|
({
|
||||||
setEditorRef,
|
setEditorRef,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user