Disable browser spellchecking with code
This commit is contained in:
@@ -9,7 +9,7 @@ export default function Code({ children, node, readOnly, attributes }: Props) {
|
||||
const language = node.data.get('language') || 'javascript';
|
||||
|
||||
return (
|
||||
<Container {...attributes}>
|
||||
<Container {...attributes} spellCheck={false}>
|
||||
{readOnly && <CopyButton text={node.text} />}
|
||||
<Pre className={`language-${language}`}>
|
||||
<code className={`language-${language}`}>{children}</code>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
import styled from 'styled-components';
|
||||
import { color } from 'shared/styles/constants';
|
||||
|
||||
const InlineCode = styled.code`
|
||||
const InlineCode = styled.code.attrs({
|
||||
spellCheck: false,
|
||||
})`
|
||||
padding: 0.25em;
|
||||
background: ${color.smoke};
|
||||
border-radius: 4px;
|
||||
|
||||
Reference in New Issue
Block a user