mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:19:45 +00:00
Докрутил парсер, добавил стили проектов
This commit is contained in:
1 parent
ac25dff111
commit
f22179654b
3 files changed
+145
-4
No files matched your search
@@ -19,7 +19,7 @@ export const parseContent = (html: string): ParsedContent[] => {
|
||||
}
|
||||
|
||||
// Обработка медиа-элементов (img внутри figure)
|
||||
if (node.type === "figure") {
|
||||
if (node.type === "figure" && node.props.className.includes('wp-block-image')) {
|
||||
const imgSrc = node.props.children?.props?.src;
|
||||
if (imgSrc) {
|
||||
mediaBuffer.push(imgSrc);
|
||||
@@ -48,5 +48,8 @@ export const parseContent = (html: string): ParsedContent[] => {
|
||||
result.push({ type: "mediablock", value: [...mediaBuffer] });
|
||||
}
|
||||
|
||||
console.log('nonParsedElements', elements);
|
||||
console.log('parsedElements', result);
|
||||
|
||||
return result;
|
||||
};
|
||||
Reference in new issue
Block a user