Skip to content

Commit 10bd519

Browse files
authored
Update js-yaml calls in docgen script (#4618)
* Fix js-yaml method * Fix another call
1 parent c49689b commit 10bd519

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/docgen/generate-docs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ let tocText = '';
133133
* @param {string} homeRaw
134134
*/
135135
function generateTempHomeMdFile(tocRaw, homeRaw) {
136-
const { toc } = yaml.safeLoad(tocRaw);
136+
const { toc } = yaml.load(tocRaw);
137137
let tocPageLines = [homeRaw, '# API Reference'];
138138
toc.forEach(group => {
139139
tocPageLines.push(`\n## [${group.title}](${stripPath(group.path)}.html)`);
@@ -259,7 +259,7 @@ function writeGeneratedFileList(htmlFiles) {
259259
path: `${devsitePath}${filename}`
260260
};
261261
});
262-
const generatedTocYAML = yaml.safeDump({ toc: fileList });
262+
const generatedTocYAML = yaml.dump({ toc: fileList });
263263
return fs
264264
.writeFile(`${docPath}/_toc_autogenerated.yaml`, generatedTocYAML)
265265
.then(() => htmlFiles);

0 commit comments

Comments
 (0)