Skip to content

Commit

Permalink
feat(xlf/renderer/xlf-md): html inline
Browse files Browse the repository at this point in the history
  • Loading branch information
moki committed Nov 21, 2023
1 parent 923c98c commit 5685fde
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/xlf/renderer/xlf-md/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}

Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 5685fde

Please sign in to comment.