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:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user