1
0
Fork 0

fix code block and code editor display on rtl languages by forcing ltr view.

This commit is contained in:
ChaotiCryptidz 2022-01-11 13:01:02 +00:00
parent 7608df51b3
commit ee73b19704
2 changed files with 2 additions and 1 deletions

View file

@ -16,6 +16,7 @@ export function CodeBlock(props: CodeBlockProps): JSX.Element {
return (
<pre
class="code-block language-json line-numbers"
dir="ltr"
dangerouslySetInnerHTML={{ __html: highlightedCode }}
/>
);

View file

@ -50,7 +50,7 @@ export class CodeEditor extends Component<CodeEditorProps, unknown> {
render(): JSX.Element {
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} />
);
}
}