瀏覽代碼

add regex101.com link

Shun Miyazawa 2 年之前
父節點
當前提交
709a514950
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      packages/core/src/utils/page-path-utils/index.ts

+ 1 - 0
packages/core/src/utils/page-path-utils/index.ts

@@ -294,6 +294,7 @@ export const generateChildrenRegExp = (path: string): RegExp => {
  */
 export const getUsernameByPath = (path: string): string | null => {
   let username: string | null = null;
+  // https://regex101.com/r/qj4SfD/1
   const match = path.match(/^\/user\/([^/]+)\/?/);
   if (match) {
     username = match[1];