mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-17 02:10:39 +03:00
parent
8fb9cd6bac
commit
2ecc8bc58e
|
@ -89,13 +89,13 @@ export class SectionItem extends React.Component<ContentItemProps> {
|
||||||
{name}
|
{name}
|
||||||
</H1>
|
</H1>
|
||||||
{components ? (
|
{components ? (
|
||||||
<Markdown source={description || ''} />
|
|
||||||
) : (
|
|
||||||
<StoreConsumer>
|
<StoreConsumer>
|
||||||
{store => (
|
{store => (
|
||||||
<Markdown source={description || ''} allowedComponents={components} store={store} />
|
<Markdown source={description || ''} allowedComponents={components} store={store} />
|
||||||
)}
|
)}
|
||||||
</StoreConsumer>
|
</StoreConsumer>
|
||||||
|
) : (
|
||||||
|
<Markdown source={description || ''} />
|
||||||
)}
|
)}
|
||||||
</MiddlePanel>
|
</MiddlePanel>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -76,11 +76,11 @@ export class OpenAPIParser {
|
||||||
const description = spec.info.description || '';
|
const description = spec.info.description || '';
|
||||||
const legacySecurityRegexp = new RegExp(
|
const legacySecurityRegexp = new RegExp(
|
||||||
COMPONENT_REGEXP.replace('{component}', '<security-definitions>'),
|
COMPONENT_REGEXP.replace('{component}', '<security-definitions>'),
|
||||||
'gmi',
|
'mi',
|
||||||
);
|
);
|
||||||
const securityRegexp = new RegExp(
|
const securityRegexp = new RegExp(
|
||||||
MDX_COMPONENT_REGEXP.replace('{component}', 'security-definitions'),
|
MDX_COMPONENT_REGEXP.replace('{component}', 'security-definitions'),
|
||||||
'gmi',
|
'mi',
|
||||||
);
|
);
|
||||||
if (!legacySecurityRegexp.test(description) && !securityRegexp.test(description)) {
|
if (!legacySecurityRegexp.test(description) && !securityRegexp.test(description)) {
|
||||||
const comment = buildComponentComment('security-definitions');
|
const comment = buildComponentComment('security-definitions');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user