diff --git a/src/compiler/docs/readme/docs-util.ts b/src/compiler/docs/readme/docs-util.ts index cb4d9e1bbf9..c7f1c9b69e2 100644 --- a/src/compiler/docs/readme/docs-util.ts +++ b/src/compiler/docs/readme/docs-util.ts @@ -34,7 +34,7 @@ export class MarkdownTable { function escapeMarkdownTableColumn(text: string) { text = text.replace(/\r?\n/g, ' '); - text = text.replace(/\|/g, '\\|'); + text = text.replace(/\|/g, 'or'); return text; } diff --git a/src/compiler/docs/test/markdown-props.spec.ts b/src/compiler/docs/test/markdown-props.spec.ts index a91625c001f..f6c827941b5 100644 --- a/src/compiler/docs/test/markdown-props.spec.ts +++ b/src/compiler/docs/test/markdown-props.spec.ts @@ -32,8 +32,8 @@ describe('markdown props', () => { | Property | Attribute | Description | Type | Default | | -------- | --------- | -------------- | ------------------- | ------- | -| \`hello\` | \`hello\` | This is a prop | \`boolean \\| string\` | \`false\` | -| \`hello\` | -- | This is a prop | \`boolean \\| string\` | \`false\` | +| \`hello\` | \`hello\` | This is a prop | \`boolean or string\` | \`false\` | +| \`hello\` | -- | This is a prop | \`boolean or string\` | \`false\` | `); });