fix: fix Authentication section is not rendered

fixes #590
This commit is contained in:
Roman Hotsiy 2018-08-07 11:19:13 +03:00
parent 8fb9cd6bac
commit 2ecc8bc58e
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 4 additions and 4 deletions

View File

@ -89,13 +89,13 @@ export class SectionItem extends React.Component<ContentItemProps> {
{name}
</H1>
{components ? (
<Markdown source={description || ''} />
) : (
<StoreConsumer>
{store => (
<Markdown source={description || ''} allowedComponents={components} store={store} />
)}
</StoreConsumer>
) : (
<Markdown source={description || ''} />
)}
</MiddlePanel>
</Row>

View File

@ -76,11 +76,11 @@ export class OpenAPIParser {
const description = spec.info.description || '';
const legacySecurityRegexp = new RegExp(
COMPONENT_REGEXP.replace('{component}', '<security-definitions>'),
'gmi',
'mi',
);
const securityRegexp = new RegExp(
MDX_COMPONENT_REGEXP.replace('{component}', 'security-definitions'),
'gmi',
'mi',
);
if (!legacySecurityRegexp.test(description) && !securityRegexp.test(description)) {
const comment = buildComponentComment('security-definitions');