Răsfoiți Sursa

Fix: Portal highlight

Sotaro KARASAWA 10 ani în urmă
părinte
comite
b9dadcfc60
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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;
 
   function isPortalPath(path) {
-    if (path.match(/.+\/$/)) {
+    if (path.match(/.*\/$/)) {
       return true;
     }
 

+ 1 - 1
resource/js/crowi.js

@@ -301,7 +301,7 @@ $(function() {
     var path = $link.data('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>'));
   });