import React from 'react' import {Heading, Link} from '@primer/components' import {CodeExample} from '@primer/blueprints' import Outline from './Outline' export const H1 = props => export default function getComponents(page = {}) { const {outline: getOutline = () => []} = page return { h1: H1, // render links with our component a: Link, // render code blocks with our wrapper around react-live code: CodeExample, // render the outline for

tags with exactly the text "{:toc}" p: ({children, ...rest}) => { if (children === '{:toc}') { return } else { return

{children}

} }, // "unwrap"
 elements around  blocks
    pre: props => props.children
  }
}