mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Assistant] Fix markdown syntax highlighting (#212333)
## Summary Implements https://github.com/elastic/eui/pull/8317 Before: <img width="1007" alt="image" src="https://github.com/user-attachments/assets/649a075a-7338-434b-9e2e-4c4fd0d6ca6f" /> After: <img width="1484" alt="image" src="https://github.com/user-attachments/assets/cdb27885-e009-49aa-9b1a-381e12c33727" />
This commit is contained in:
parent
c0c64a8489
commit
f8ba372106
2 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ import { EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiPanel, useEuiTheme } from '
|
|||
import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
export const CustomCodeBlock = ({ value }: { value: string }) => {
|
||||
export const CustomCodeBlock = ({ value, lang }: { value: string; lang: string }) => {
|
||||
const theme = useEuiTheme();
|
||||
|
||||
return (
|
||||
|
@ -31,7 +31,7 @@ export const CustomCodeBlock = ({ value }: { value: string }) => {
|
|||
>
|
||||
<EuiFlexGroup direction="column" gutterSize="xs">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiCodeBlock isCopyable fontSize="m">
|
||||
<EuiCodeBlock isCopyable fontSize="m" language={lang}>
|
||||
{value}
|
||||
</EuiCodeBlock>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -132,7 +132,7 @@ const getPluginDependencies = ({
|
|||
customCodeBlock: (props) => {
|
||||
return (
|
||||
<>
|
||||
<CustomCodeBlock value={props.value} />
|
||||
<CustomCodeBlock value={props.value} lang={props.lang} />
|
||||
<EuiSpacer size="m" />
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue