fix code block and code editor display on rtl languages by forcing ltr view.
This commit is contained in:
parent
7608df51b3
commit
ee73b19704
|
@ -16,6 +16,7 @@ export function CodeBlock(props: CodeBlockProps): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<pre
|
<pre
|
||||||
class="code-block language-json line-numbers"
|
class="code-block language-json line-numbers"
|
||||||
|
dir="ltr"
|
||||||
dangerouslySetInnerHTML={{ __html: highlightedCode }}
|
dangerouslySetInnerHTML={{ __html: highlightedCode }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class CodeEditor extends Component<CodeEditorProps, unknown> {
|
||||||
|
|
||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div class={"editor line-numbers language-" + this.props.language} ref={this.editorRef} />
|
<div dir="ltr" class={"editor line-numbers language-" + this.props.language} ref={this.editorRef} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue