@@ -52,12 +52,15 @@ const DOCGEN_OPTIONS = {
5252 * List of pro components that require special handling.
5353 */
5454const PRO_COMPONENTS = [
55+ 'CCalendar' ,
5556'CDatePicker' ,
5657'CDateRangePicker' ,
5758'CFormMask' ,
5859'CLoadingButton' ,
5960'CMultiSelect' ,
6061'CRating' ,
62+ 'CRangeSlider' ,
63+ 'CRating' ,
6164'CSmartPagination' ,
6265'CSmartTable' ,
6366'CTimePicker' ,
@@ -72,13 +75,10 @@ const PRO_COMPONENTS = [
7275 */
7376function escapeMarkdown ( text ) {
7477if ( typeof text !== 'string' ) return text
75- return (
76- text
77- . replaceAll ( / ( < ) / g, String . raw `\$1` )
78- // .replaceAll(/<C(.*)\/>/g, '`<C$1/>`')
79- . replaceAll ( '\n' , '<br/>' )
80- . replaceAll ( / ` ( [ ^ ` ] + ) ` / g, '<code>{`$1`}</code>' )
81- )
78+ return text
79+ . replaceAll ( / ( < ) / g, String . raw `\$1` )
80+ . replaceAll ( '\n' , '<br/>' )
81+ . replaceAll ( / ` ( [ ^ ` ] + ) ` / g, '<code>{`$1`}</code>' )
8282}
8383
8484/**
@@ -190,10 +190,10 @@ async function createMdx(file, component) {
190190let content = `\n\`\`\`jsx\n`
191191const importPathParts = relativeFilename . split ( '/' )
192192if ( importPathParts . length > 1 ) {
193- content += `import {${ component . displayName } } from '@coreui/${ importPathParts [ 1 ] } '\n`
193+ content += `import {${ component . displayName } } from '@coreui/${ importPathParts [ 0 ] } '\n`
194194}
195195content += `// or\n`
196- content += `import${ component . displayName } from '@coreui${ relativeFilename . replace ( '.tsx' , '' ) } '\n`
196+ content += `import${ component . displayName } from '@coreui/ ${ relativeFilename . replace ( '.tsx' , '' ) } '\n`
197197content += `\`\`\`\n\n`
198198
199199const sortedProps = Object . entries ( component . props ) . sort ( ( [ a ] , [ b ] ) => a . localeCompare ( b ) )