MCPcopy Index your code
hub / github.com/github/docs / createProcessor

Function createProcessor

lib/render-content/create-processor.js:26–49  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

24import doctocatLinkIcon from './doctocat-link-icon.js'
25
26export default function createProcessor(context) {
27 return unified()
28 .use(process.env.COMMONMARK ? markdownNext : markdown)
29 .use(process.env.COMMONMARK ? gfm : null)
30 .use(remarkCodeExtra, { transform: codeHeader })
31 .use(emoji)
32 .use(remark2rehype, { allowDangerousHtml: true })
33 .use(slug)
34 .use(useEnglishHeadings, context)
35 .use(autolinkHeadings, {
36 behavior: 'prepend',
37 properties: { ariaHidden: true, tabIndex: -1, class: 'doctocat-link' },
38 content: doctocatLinkIcon,
39 })
40 .use(highlight, {
41 languages: { graphql, dockerfile, http, groovy, erb, powershell },
42 subset: false,
43 })
44 .use(raw)
45 .use(wrapInElement, { selector: 'ol > li img', wrapper: 'span.procedural-image-wrapper' })
46 .use(rewriteImgSources)
47 .use(rewriteLocalLinks, context)
48 .use(html)
49}
50
51export function createMinimalProcessor(context) {
52 return unified()

Callers 1

renderContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected