1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Upgrade pipeline with env COMMONMARK=1 npm start to see new, otherwise parse current (#20508)

* Update the trim nightmare

* Update create-processor.js

* Update other packages in the rendering pipeline

* A few more updates

* Fix tables

* Update lint-files.js

* Fix copy code blocks

* Update render-content.js

* remove whitespace from liquid conditionals

* We no longer need require eslint rules

* Neat, it worked

* Revert test change

* Update create-processor.js

* Without aliases

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
This commit is contained in:
Kevin Heis
2021-07-29 07:24:26 -07:00
committed by GitHub
parent 648c12948b
commit d68dde17d1
13 changed files with 6090 additions and 4112 deletions

View File

@@ -1,5 +1,7 @@
import unified from 'unified'
import markdown from 'remark-parse'
import { unified } from 'unified'
import markdown from 'remark-parse-no-trim'
import markdownNext from 'remark-parse'
import gfm from 'remark-gfm'
import emoji from 'remark-gemoji-to-emoji'
import remark2rehype from 'remark-rehype'
import raw from 'rehype-raw'
@@ -18,7 +20,8 @@ const graphql = xHighlightjsGraphql.definer
export default function createProcessor(context) {
return unified()
.use(markdown)
.use(process.env.COMMONMARK ? markdownNext : markdown)
.use(process.env.COMMONMARK ? gfm : null)
.use(remarkCodeExtra, { transform: codeHeader })
.use(emoji)
.use(remark2rehype, { allowDangerousHtml: true })