cherry-pick(#15093): chore: fix api.json
This commit is contained in:
parent
c74c9a3690
commit
7b78e71433
|
|
@ -15,7 +15,7 @@ echo "Building playwright-core package"
|
|||
node ../../utils/pack_package.js playwright-core ./output/playwright-core.tgz
|
||||
|
||||
echo "Building api.json and protocol.yml"
|
||||
node ../../utils/doclint/generateApiJson.js > ./output/api.json
|
||||
API_JSON_MODE=1 node ../../utils/doclint/generateApiJson.js > ./output/api.json
|
||||
cp ../../packages/playwright-core/src/protocol/protocol.yml ./output/
|
||||
|
||||
function build {
|
||||
|
|
|
|||
|
|
@ -264,7 +264,10 @@ function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
|||
|
||||
if (node.type === 'code') {
|
||||
newLine();
|
||||
result.push(`${indent}\`\`\`${codeLangToHighlighter(node.codeLang)}`);
|
||||
if (process.env.API_JSON_MODE)
|
||||
result.push(`${indent}\`\`\`${node.codeLang}`);
|
||||
else
|
||||
result.push(`${indent}\`\`\`${codeLangToHighlighter(node.codeLang)}`);
|
||||
for (const line of node.lines)
|
||||
result.push(indent + line);
|
||||
result.push(`${indent}\`\`\``);
|
||||
|
|
|
|||
Loading…
Reference in a new issue