@@ -52,12 +52,15 @@ const DOCGEN_OPTIONS = {
52
52
* List of pro components that require special handling.
53
53
*/
54
54
const PRO_COMPONENTS = [
55
+ 'CCalendar' ,
55
56
'CDatePicker' ,
56
57
'CDateRangePicker' ,
57
58
'CFormMask' ,
58
59
'CLoadingButton' ,
59
60
'CMultiSelect' ,
60
61
'CRating' ,
62
+ 'CRangeSlider' ,
63
+ 'CRating' ,
61
64
'CSmartPagination' ,
62
65
'CSmartTable' ,
63
66
'CTimePicker' ,
@@ -72,13 +75,10 @@ const PRO_COMPONENTS = [
72
75
*/
73
76
function escapeMarkdown ( text ) {
74
77
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>' )
82
82
}
83
83
84
84
/**
@@ -190,10 +190,10 @@ async function createMdx(file, component) {
190
190
let content = `\n\`\`\`jsx\n`
191
191
const importPathParts = relativeFilename . split ( '/' )
192
192
if ( importPathParts . length > 1 ) {
193
- content += `import { ${ component . displayName } } from '@coreui/${ importPathParts [ 1 ] } '\n`
193
+ content += `import { ${ component . displayName } } from '@coreui/${ importPathParts [ 0 ] } '\n`
194
194
}
195
195
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`
197
197
content += `\`\`\`\n\n`
198
198
199
199
const sortedProps = Object . entries ( component . props ) . sort ( ( [ a ] , [ b ] ) => a . localeCompare ( b ) )
0 commit comments