generator
generator copied to clipboard
Markdown: Vertical bars not "escaped" within tables.
Describe the bug
Given content that includes vertical bars, such as regular expressions, when rendered in a markdown table cell, the vertical bars in the content are not escaped (ex. using HTML escape characters)
How to Reproduce
asyncapi: 2.4.0
id: urn:com
info:
title: title
version: 1.0.0
defaultContentType: application/json
channels:
topic:
publish:
operationId: publishEvent
message:
name: event
payload:
$ref: "#/components/schemas/schema"
components:
schemas:
schema:
type: object
required:
- eventStart
properties:
eventStart:
type: string
description: ISO8601 UTC date-time string using Z zone designator
format: date-time
# Regex Modified to remove zone offset designators from https://stackoverflow.com/a/43931246/107683
pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z)$
Expected behavior
The vertical bars that are part of table cell content need to be "escaped", probably by using HTML encoding within a <code>block.
https://stackoverflow.com/a/43591562/107683