From 06b5d2225ddb2ea9f783737e1ee9154cc1ece055 Mon Sep 17 00:00:00 2001 From: Vladimir Ivakin Date: Wed, 5 Jun 2024 20:53:26 +0200 Subject: [PATCH 1/2] [lexical-markdown] Add test to keep code language --- .../src/__tests__/unit/LexicalMarkdown.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts b/packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts index e5eb74bda..3c930fd6c 100644 --- a/packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts +++ b/packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts @@ -186,6 +186,15 @@ describe('Markdown', () => { html: '
Code
', md: '```\nCode\n```', }, + { + html: '
Code
', + md: '```javascript\nCode\n```', + }, + { + // Should always preserve language in md but keep data-highlight-language only for supported languages + html: '
Code
', + md: '```rust\nCode\n```', + }, { // Import only: prefix tabs will be removed for export html: '
Code
', From b6e868b666c5433e514bbc09bb16de34fdd41a06 Mon Sep 17 00:00:00 2001 From: "local-dev-korbit-ai-mentor[bot]" <130798245+local-dev-korbit-ai-mentor[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:16:44 +0000 Subject: [PATCH 2/2] [skip ci]