diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js index 1f814b365a..20d3600062 100644 --- a/utils/doclint/generateDotnetApi.js +++ b/utils/doclint/generateDotnetApi.js @@ -204,6 +204,15 @@ const customTypeNames = new Map([ if (process.argv[3] !== "--skip-format") { // run the formatting tool for .net, to ensure the files are prepped execSync(`dotnet format -f "${typesDir}" --include-generated --fix-whitespace`); + if (process.platform !== 'win32') { + for (const folder of [typesDir, path.join(typesDir, 'Models'), path.join(typesDir, 'Enums'), path.join(typesDir, 'Extensions'), path.join(typesDir, 'Constants')]) + for (const name of fs.readdirSync(folder)) { + if (!name.includes('\.cs')) + continue; + const content = fs.readFileSync(path.join(folder, name), 'utf-8'); + fs.writeFileSync(path.join(folder, name), content.split('\r\n').join('\n')); + } + } } } diff --git a/utils/doclint/xmlDocumentation.js b/utils/doclint/xmlDocumentation.js index ca8aca3cda..cca6c1b4fe 100644 --- a/utils/doclint/xmlDocumentation.js +++ b/utils/doclint/xmlDocumentation.js @@ -77,7 +77,7 @@ function _wrapCode(lines) { let i = 0; let out = []; for (let line of lines) { - line = line.replace('<', '<').replace('>', '>'); + line = line.replace(/[&]/g, '&').replace(//g, '>'); if (i < lines.length - 1) line = line + "
"; out.push(line);