From a7db69739bd3b41f1a0abedf536023220a2425fa Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Fri, 12 Jul 2024 14:23:26 +0300 Subject: [PATCH] fix: Handle liquid inside html --- src/skeleton/rules/html.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skeleton/rules/html.ts b/src/skeleton/rules/html.ts index 11121aa..0c846bb 100644 --- a/src/skeleton/rules/html.ts +++ b/src/skeleton/rules/html.ts @@ -3,6 +3,7 @@ import type {CustomRenderer} from 'src/renderer'; import type {Consumer} from 'src/consumer'; import type {HTMLElement, Node, TextNode} from 'node-html-parser'; import {NodeType, parse} from 'node-html-parser'; +import {Liquid} from 'src/skeleton/liquid'; import {token} from 'src/utils'; function isText(node: Node): node is TextNode { @@ -138,7 +139,7 @@ export const html: RenderRuleRecord = { function handleInline(node: Node): Token[] { if (isText(node)) { - return [token('text', {content: node.innerText})]; + return new Liquid(node.innerText).tokenize(); } if (!node.childNodes.length) {