@@ -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 ) {
7477 if ( 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) {
190190 let content = `\n\`\`\`jsx\n`
191191 const importPathParts = relativeFilename . split ( '/' )
192192 if ( importPathParts . length > 1 ) {
193- content += `import { ${ component . displayName } } from '@coreui/${ importPathParts [ 1 ] } '\n`
193+ content += `import { ${ component . displayName } } from '@coreui/${ importPathParts [ 0 ] } '\n`
194194 }
195195 content += `// or\n`
196- content += `import ${ component . displayName } from '@coreui${ relativeFilename . replace ( '.tsx' , '' ) } '\n`
196+ content += `import ${ component . displayName } from '@coreui/ ${ relativeFilename . replace ( '.tsx' , '' ) } '\n`
197197 content += `\`\`\`\n\n`
198198
199199 const sortedProps = Object . entries ( component . props ) . sort ( ( [ a ] , [ b ] ) => a . localeCompare ( b ) )
0 commit comments