소스 검색

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];