Minor fixes
This commit is contained in:
@@ -4,7 +4,6 @@ import styled from 'styled-components';
|
||||
import CopyButton from './CopyButton';
|
||||
import { color } from 'shared/styles/constants';
|
||||
import type { Props } from '../types';
|
||||
import 'shared/styles/prism.css';
|
||||
|
||||
export default function Code({ children, node, readOnly, attributes }: Props) {
|
||||
const language = node.data.get('language') || 'javascript';
|
||||
|
||||
@@ -27,7 +27,6 @@ function Heading(props: Props) {
|
||||
children,
|
||||
component = 'h1',
|
||||
attributes,
|
||||
...rest
|
||||
} = props;
|
||||
const parentIsDocument = parent instanceof Document;
|
||||
const firstHeading = parentIsDocument && parent.nodes.first() === node;
|
||||
@@ -41,7 +40,7 @@ function Heading(props: Props) {
|
||||
emoji && title.match(new RegExp(`^${emoji}\\s`));
|
||||
|
||||
return (
|
||||
<Component {...attributes} {...rest} id={slugish}>
|
||||
<Component {...attributes} id={slugish}>
|
||||
<Wrapper hasEmoji={startsWithEmojiAndSpace}>
|
||||
{children}
|
||||
</Wrapper>
|
||||
|
||||
Reference in New Issue
Block a user