diff --git a/src/xlf/renderer/xlf-md/__snapshots__/renderer-inline.test.ts.snap b/src/xlf/renderer/xlf-md/__snapshots__/renderer-inline.test.ts.snap index 82028543..addf3812 100644 --- a/src/xlf/renderer/xlf-md/__snapshots__/renderer-inline.test.ts.snap +++ b/src/xlf/renderer/xlf-md/__snapshots__/renderer-inline.test.ts.snap @@ -24,6 +24,8 @@ exports[`renders xlf to markdown renders image with src title and width size wra exports[`renders xlf to markdown renders image with src wrapped in and tags 1`] = `"Sentence ![image](image.png)."`; +exports[`renders xlf to markdown renders inline html wrapped in tags 1`] = `"Sentence
with html."`; + exports[`renders xlf to markdown renders link with title wrapped in and tags 1`] = `"Предложение номер [один](one.md \\"one\\")."`; exports[`renders xlf to markdown renders link wrapped in and tags 1`] = `"Предложение номер [два](two.md)."`; diff --git a/src/xlf/renderer/xlf-md/renderer-inline.test.ts b/src/xlf/renderer/xlf-md/renderer-inline.test.ts index 18d24d71..f5388d03 100644 --- a/src/xlf/renderer/xlf-md/renderer-inline.test.ts +++ b/src/xlf/renderer/xlf-md/renderer-inline.test.ts @@ -1102,4 +1102,40 @@ describe('renders xlf to markdown', () => { const rendered = renderer.render(tokens); expect(rendered).toMatchSnapshot(); }); + + it('renders inline html wrapped in tags', () => { + const renderer = new XLFMDRenderer(); + const tokens: Array = [ + {type: 'tag', data: 'target', nodeType: 'open'}, + {type: 'text', data: 'Sentence'}, + { + type: 'tag', + data: 'x', + nodeType: 'self-closing', + syntax: 'html_inline', + equivText: '
', + }, + {type: 'text', data: 'with '}, + { + type: 'tag', + data: 'x', + nodeType: 'self-closing', + syntax: 'html_inline', + equivText: '', + }, + {type: 'text', data: 'html'}, + { + type: 'tag', + data: 'x', + nodeType: 'self-closing', + syntax: 'html_inline', + equivText: '', + }, + {type: 'text', data: '.'}, + {type: 'tag', data: 'target', nodeType: 'close'}, + ]; + + const rendered = renderer.render(tokens); + expect(rendered).toMatchSnapshot(); + }); });