Explorar o código

Add lookahead assertion

ykanematsu %!s(int64=3) %!d(string=hai) anos
pai
achega
fc8f0fcf1f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/core/src/models/devided-page-path.js

+ 1 - 1
packages/core/src/models/devided-page-path.js

@@ -32,7 +32,7 @@ export class DevidedPagePath {
       }
     }
 
-    let PATTERN_DEFAULT = /^((.*)\/)?(.+)$/; // this will not ignore html end tags https://regex101.com/r/jpZwIe/1
+    let PATTERN_DEFAULT = /^((.*)\/(?!em>))?(.+)$/; // this will ignore em's end tags
     try { // for non-chrome browsers
       // eslint-disable-next-line regex/invalid
       PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1