Skip to content

Commit 4451678

Browse files
authored
Use Markdown styles in CodeQL pipeline (#39408)
1 parent dbd895d commit 4451678

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/codeql-cli/scripts/convert-markdown-for-docs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { visit, SKIP } from 'unist-util-visit'
88
import { remove } from 'unist-util-remove'
99

1010
import { languageKeys } from '../../../lib/languages.js'
11+
import { MARKDOWN_OPTIONS } from '../../content-linter/lib/helpers/unified-formatter-options.js'
1112

1213
const { targetDirectory, removeKeywords } = JSON.parse(
1314
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8'),
@@ -217,7 +218,7 @@ export async function convertContentToDocs(content, frontmatterDefaults = {}) {
217218
// remove the first heading from the AST because that becomes frontmatter
218219
remove(ast, (node) => node.type === 'heading' && node.depth === 1)
219220

220-
return { content: toMarkdown(ast), data: frontmatter }
221+
return { content: toMarkdown(ast, MARKDOWN_OPTIONS), data: frontmatter }
221222
}
222223

223224
// performs a get request for a aka.ms url and returns the redirect url
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const MARKDOWN_OPTIONS = {
2+
bullet: '-',
3+
emphasis: '_',
4+
closeAtx: false,
5+
fence: '`',
6+
fences: true,
7+
incrementListMarker: false,
8+
strong: '*',
9+
}

0 commit comments

Comments
 (0)