From 5458e89fee3c508d05a0af187807392ca4ae3b34 Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Wed, 30 Oct 2024 20:01:05 +0530 Subject: [PATCH] chore: fix code style in markdown (#37141) ## Summary by CodeRabbit - **Bug Fixes** - Adjusted CSS styles for the Markdown component to improve the display of inline code elements without specific programming language classes. - **Style** - Enhanced specificity of styles for inline code snippets, ensuring consistent styling across different scenarios. - Added `white-space: normal;` to improve whitespace handling within code elements. > [!WARNING] > Tests have not run on the HEAD 67606f8ceef02db5ef6f82bfb5691d6272e3ef5d yet >
Wed, 30 Oct 2024 14:03:46 UTC --- .../widgets/src/components/Markdown/src/styles.module.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css index e671e7d0cf..6d83b09410 100644 --- a/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css @@ -95,12 +95,13 @@ overflow: auto; } - code:not(pre code) { + code:not([class*="language-"]) { padding-inline: var(--inner-spacing-1); background: var(--color-bg-neutral-subtle); color: var(--color-fg-negative); border-radius: var(--border-radius-elevation-3); word-break: break-word; + white-space: normal; outline: var(--border-width-1) solid var(--color-bg-neutral-soft); }