Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix validation regex containing pipe character breaks default markdown template table #83

Conversation

pseudorandoom
Copy link
Contributor

Validation pattern is not currently markdown escaped and can break markdown's table markup when it includes a | character

Copy link

cla-checker-service bot commented May 29, 2024

💚 CLA has been signed

@pseudorandoom pseudorandoom force-pushed the fix-regex-with-pipe-character-breaks-default-validation-template-table branch from 32babbe to aafd727 Compare May 29, 2024 17:56
@thbkrkr thbkrkr added the bug Something isn't working label Jul 23, 2024
@@ -31,7 +31,7 @@ _Appears in:_
{{ end -}}

{{ range $type.Members -}}
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}} {{ . }} <br />{{ end }} |
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ markdownRenderDefault .Default }} | {{ range .Validation -}} {{ markdownRenderFieldDoc . }} <br />{{ end }} |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we reuse markdownRenderFieldDoc to render the custom validation marker. It's ok-ish but not very clean for me. Similar to #81 (comment), let's merge and refactor this later.

@thbkrkr thbkrkr merged commit 56876bc into elastic:master Jul 23, 2024
1 check passed
@thbkrkr
Copy link
Contributor

thbkrkr commented Jul 25, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants