From ac440299efe12bda06f8a23a0d340cc8fbeb5f3d Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Thu, 15 Dec 2022 16:22:04 +0100 Subject: [PATCH] repo-tools: Quote markdown headers Signed-off-by: Johan Haals --- .changeset/thirty-llamas-whisper.md | 5 +++++ .../repo-tools/src/commands/api-reports/api-extractor.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/thirty-llamas-whisper.md diff --git a/.changeset/thirty-llamas-whisper.md b/.changeset/thirty-llamas-whisper.md new file mode 100644 index 0000000000..9ecf4b591c --- /dev/null +++ b/.changeset/thirty-llamas-whisper.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +Updated api docs generation to be compatible with Docusaurus 2-alpha and 2.x. diff --git a/packages/repo-tools/src/commands/api-reports/api-extractor.ts b/packages/repo-tools/src/commands/api-reports/api-extractor.ts index e6f1ffb101..5ec0804ee8 100644 --- a/packages/repo-tools/src/commands/api-reports/api-extractor.ts +++ b/packages/repo-tools/src/commands/api-reports/api-extractor.ts @@ -840,7 +840,9 @@ export async function buildDocs({ context.writer.writeLine('---'); for (const [name, value] of Object.entries(node.values)) { if (value) { - context.writer.writeLine(`${name}: ${value}`); + context.writer.writeLine( + `${name}: "${String(value).replace(/\"/g, '')}"`, + ); } } context.writer.writeLine('---');