/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/math/deprecated.js
41 строка
718 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { useBlockProps } from '@wordpress/block-editor'; // v1: Add a wrapper div around the math element. const v1 = { attributes: { latex: { type: 'string', role: 'content', }, mathML: { type: 'string', source: 'html', selector: 'math', }, }, save( { attributes } ) { const { latex, mathML } = attributes; if ( ! latex ) { return null; } return ( <math { ...useBlockProps.save() } display="block" dangerouslySetInnerHTML={ { __html: mathML } } /> ); }, }; /** * New deprecations need to be placed first * for them to have higher priority. * * Old deprecations may need to be updated as well. * * See block-deprecation.md */ export default [ v1 ];