mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
docs: Add a note about expected newlines in multiline markdown fields (#1372)
This commit is contained in:
committed by
GitHub
parent
23eeb3ce85
commit
574541f12e
@@ -493,6 +493,11 @@ rules:
|
||||
notPattern: /^The/
|
||||
```
|
||||
|
||||
Take care using `notPattern` with multiline Markdown values such as
|
||||
`description` fields. These may end with a newline rather than the character
|
||||
you expect. Use the trimmed notations (`|-` or `>-`) or take account of this in
|
||||
your pattern.
|
||||
|
||||
### `pattern` example
|
||||
|
||||
The following example asserts that the operation summary contains "test".
|
||||
@@ -507,6 +512,10 @@ rules:
|
||||
pattern: /test/
|
||||
```
|
||||
|
||||
Take care using `pattern` with multiline Markdown values such as `description`
|
||||
fields. These may end with a newline rather than the character you expect. Use
|
||||
the trimmed notations (`|-` or `>-`) or take account of this in your pattern.
|
||||
|
||||
### `ref` example
|
||||
|
||||
The following example asserts that schema in MediaType contains a Reference object ($ref).
|
||||
|
||||
Reference in New Issue
Block a user