From 5685fde552c23243598c937a86db765b99dfb102 Mon Sep 17 00:00:00 2001 From: moki Date: Tue, 21 Nov 2023 22:24:30 +0400 Subject: [PATCH] feat(xlf/renderer/xlf-md): html inline --- src/xlf/renderer/xlf-md/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xlf/renderer/xlf-md/index.ts b/src/xlf/renderer/xlf-md/index.ts index 314c883f..20fd9228 100644 --- a/src/xlf/renderer/xlf-md/index.ts +++ b/src/xlf/renderer/xlf-md/index.ts @@ -51,6 +51,7 @@ class XLFMDRenderer { liquid_Function: this.liquidAsIs.bind(this), liquid_Filter: this.liquidAsIs.bind(this), liquid_Variable: this.liquidAsIs.bind(this), + html_inline: this.htmlInline.bind(this), }; } @@ -386,6 +387,16 @@ class XLFMDRenderer { return equivText; } + + htmlInline(token: XLFToken): string { + assert(isXLFTagToken(token)); + token as XLFTagToken; + + const {equivText} = token; + assert(equivText?.length, `token: ${token} has invalid equiv-text`); + + return equivText; + } } export {XLFMDRenderer};