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: do not display long regexps #1295

Merged
merged 2 commits into from
Jun 9, 2020
Merged

fix: do not display long regexps #1295

merged 2 commits into from
Jun 9, 2020

Conversation

stasiukanya
Copy link
Contributor

No description provided.

@@ -62,7 +62,9 @@ export class FieldDetails extends React.PureComponent<FieldProps> {
{schema.title && !hideSchemaTitles && <TypeTitle> ({schema.title}) </TypeTitle>}
<ConstraintsView constraints={schema.constraints} />
{schema.nullable && <NullableLabel> {l('nullable')} </NullableLabel>}
{schema.pattern && <PatternLabel> {schema.pattern} </PatternLabel>}
{schema.pattern && schema.pattern.length < 45 && (
Copy link
Member

Choose a reason for hiding this comment

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

Move 45 to module scope constant: MAX_PATTERN_LENGTH

@RomanHotsiy RomanHotsiy merged commit 2ede22c into master Jun 9, 2020
@adamaltman adamaltman deleted the hide-long-pattern branch June 18, 2020 04:22
jancerman pushed a commit to Kontent-ai-Learn/kontent-ai-learn-redoc that referenced this pull request Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants