/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/wordcount/src/stripShortcodes.ts
18 строк
463 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import type { Settings } from './types'; /** * Replaces items matched in the regex with a new line. * * @param settings The main settings object containing regular expressions * @param text The string being counted. * @return The manipulated text. */ export default function stripShortcodes( settings: Settings, text: string ): string { if ( settings.shortcodesRegExp ) { return text.replace( settings.shortcodesRegExp, '\n' ); } return text; }