1
0
mirror of synced 2026-01-20 21:02:43 -05:00

Use Markdown styles in CodeQL pipeline (#39408)

This commit is contained in:
Rachael Sewell
2023-07-21 09:32:40 -07:00
committed by GitHub
parent dbd895ddca
commit 4451678535
2 changed files with 11 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import { visit, SKIP } from 'unist-util-visit'
import { remove } from 'unist-util-remove'
import { languageKeys } from '../../../lib/languages.js'
import { MARKDOWN_OPTIONS } from '../../content-linter/lib/helpers/unified-formatter-options.js'
const { targetDirectory, removeKeywords } = JSON.parse(
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8'),
@@ -217,7 +218,7 @@ export async function convertContentToDocs(content, frontmatterDefaults = {}) {
// remove the first heading from the AST because that becomes frontmatter
remove(ast, (node) => node.type === 'heading' && node.depth === 1)
return { content: toMarkdown(ast), data: frontmatter }
return { content: toMarkdown(ast, MARKDOWN_OPTIONS), data: frontmatter }
}
// performs a get request for a aka.ms url and returns the redirect url