rspress-plugin-file-tree 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -436,7 +436,7 @@ const RemoteSvgIcon = ({ content, className })=>{
|
|
|
436
436
|
content
|
|
437
437
|
]);
|
|
438
438
|
if (!svgContent) return null;
|
|
439
|
-
return /*#__PURE__*/ jsx("
|
|
439
|
+
return /*#__PURE__*/ jsx("div", {
|
|
440
440
|
className: className,
|
|
441
441
|
dangerouslySetInnerHTML: {
|
|
442
442
|
__html: svgContent
|
|
@@ -487,12 +487,9 @@ const FileTreeItem = ({ node, depth })=>{
|
|
|
487
487
|
})
|
|
488
488
|
})
|
|
489
489
|
}),
|
|
490
|
-
/*#__PURE__*/ jsx(
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
content: icon.content,
|
|
494
|
-
className: FileTreeItem_module.iconWrapper
|
|
495
|
-
})
|
|
490
|
+
/*#__PURE__*/ jsx(RemoteSvgIcon, {
|
|
491
|
+
content: icon.content,
|
|
492
|
+
className: FileTreeItem_module.iconWrapper
|
|
496
493
|
}),
|
|
497
494
|
/*#__PURE__*/ jsx("span", {
|
|
498
495
|
className: FileTreeItem_module.name,
|
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ function isDirectoryName(name) {
|
|
|
139
139
|
const lastPart = name.split('/').pop() || name;
|
|
140
140
|
if (/^\.{2,}$/.test(lastPart)) return false;
|
|
141
141
|
if (lastPart.startsWith('.')) return false;
|
|
142
|
-
if (/\.[a-zA-Z0-
|
|
142
|
+
if (/\.[a-zA-Z0-9_-]+$/.test(lastPart)) return false;
|
|
143
143
|
return true;
|
|
144
144
|
}
|
|
145
145
|
function getExtension(name) {
|