Procházet zdrojové kódy

Fix: Portal highlight

Sotaro KARASAWA před 10 roky
rodič
revize
b9dadcfc60
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      lib/models/page.js
  2. 1 1
      resource/js/crowi.js

+ 1 - 1
lib/models/page.js

@@ -10,7 +10,7 @@ module.exports = function(crowi) {
     , pageSchema;
     , pageSchema;
 
 
   function isPortalPath(path) {
   function isPortalPath(path) {
-    if (path.match(/.+\/$/)) {
+    if (path.match(/.*\/$/)) {
       return true;
       return true;
     }
     }
 
 

+ 1 - 1
resource/js/crowi.js

@@ -301,7 +301,7 @@ $(function() {
     var path = $link.data('path');
     var path = $link.data('path');
     var shortPath = $link.data('short-path');
     var shortPath = $link.data('short-path');
 
 
-    $link.html(path.replace(new RegExp(shortPath + '/?$'), '<strong>' + shortPath + '</strong>'));
+    $link.html(path.replace(new RegExp(shortPath + '(/)?$'), '<strong>' + shortPath + '$1</strong>'));
   });
   });