Skip to content

Commit

Permalink
[core] Fix markdown loader on Windows (mui#34623)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored and alexfauquette committed Oct 14, 2022
1 parent 638a9b7 commit f375c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/packages/markdown/loader.js
Expand Up @@ -20,7 +20,7 @@ function upperCaseFirst(string) {
* @example moduleIDToJSIdentifier('../Box-new.js') === '$$$BoxNewJs'
*/
function moduleIDToJSIdentifier(moduleID) {
const delimiter = /(\.|-|\/)/;
const delimiter = /(\.|-|\/|:)/;
return moduleID
.split(delimiter)
.filter((part) => !delimiter.test(part))
Expand Down Expand Up @@ -205,7 +205,7 @@ module.exports = async function demoLoader() {
);

componentNames.forEach((componentName) => {
const moduleID = path.join(this.rootContext, 'src', componentName);
const moduleID = path.join(this.rootContext, 'src', componentName).replace(/\\/g, '/');

components[moduleID] = componentName;
componentModuleIDs.add(moduleID);
Expand Down

0 comments on commit f375c81

Please sign in to comment.