sadpandajoe commented on code in PR #34995:
URL: https://github.com/apache/superset/pull/34995#discussion_r2320929324


##########
superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx:
##########
@@ -22,7 +22,7 @@ import { AntdIconType, BaseIconProps, CustomIconType, 
IconType } from './types';
 
 const genAriaLabel = (fileName: string) => {
   const name = fileName.replace(/_/g, '-'); // Replace underscores with dashes
-  const words = name.split(/(?=[A-Z])/); // Split at uppercase letters
+  const words = name.split(/(?<=[a-z])(?=[A-Z])/); // Split at 
lowercase-to-uppercase transitions

Review Comment:
   Both regexes produce identical results for icon names like 
"CheckCircleOutlined"
   - The updated regex is actually more precise (only splits at 
lowercase-to-uppercase transitions)                                          - 
Tests are passing, proving functionality works correctly



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to