Skip to content

Commit

Permalink
Merge pull request #167 from diplodoc-platform/rndnm/disableHtmlBlock…
Browse files Browse the repository at this point in the history
…Parse

Disable html block parse in exp parser
  • Loading branch information
Feverqwe authored Aug 29, 2024
2 parents cd7e1f8 + c938035 commit fecd428
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/experiment/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function transform(content: string, options?: TransformOptions) {
.use(yfmTable)
.use(textJoinFix)
.use(term)
.disable(['entity']);
.disable(['entity', 'html_block']);

const allTokens = mdIt.parse(mdData, {});

Expand Down
7 changes: 4 additions & 3 deletions src/integration/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1200,9 +1200,7 @@ exports[`integration handles links with brackets: xliff main 1`] = `
exports[`integration handles liquid in html attributes: skeleton expr 1`] = `
"# %%%1%%%
<a href=\\"{{ extref-chat-user-d9389e00 }}\\">
<span class=\\"button\\">Button</span>
</a>"
%%%2%%%"
`;
exports[`integration handles liquid in html attributes: skeleton main 1`] = `
Expand All @@ -1226,6 +1224,9 @@ exports[`integration handles liquid in html attributes: xliff expr 1`] = `
<trans-unit id=\\"1\\">
<source xml:space=\\"preserve\\">Variable in href attribute</source>
</trans-unit>
<trans-unit id=\\"2\\">
<source xml:space=\\"preserve\\"><x equiv-text=\\"&lt;a href=&quot;{{ extref-chat-user-d9389e00 }}&quot;&gt;\\" id=\\"e1\\" x-type=\\"html_inline\\" /><x equiv-text=\\"\\" id=\\"t1--1\\" ctype=\\"lb\\" /><x equiv-text=\\"&lt;span class=&quot;button&quot;&gt;\\" id=\\"e3\\" x-type=\\"html_inline\\" />Button<x equiv-text=\\"&lt;/span&gt;\\" id=\\"e4\\" x-type=\\"html_inline\\" /><x equiv-text=\\"\\" id=\\"t3--1\\" ctype=\\"lb\\" /><x equiv-text=\\"&lt;/a&gt;\\" id=\\"e6\\" x-type=\\"html_inline\\" /></source>
</trans-unit>
</body>
</file>
</xliff>"
Expand Down

0 comments on commit fecd428

Please sign in to comment.