mirror of
https://github.com/sismics/docs.git
synced 2025-12-22 06:01:42 +00:00
Closes #305: exclude tags from search
This commit is contained in:
@@ -319,9 +319,9 @@ angular.module('docs').controller('Document', function ($scope, $rootScope, $tim
|
||||
*/
|
||||
$scope.extractNavigatedTag = function () {
|
||||
// Find the current tag in the search query
|
||||
var tagFound = /tag:([^ ]*)/.exec($scope.search);
|
||||
var tagFound = /(^| )tag:([^ ]*)/.exec($scope.search);
|
||||
if (tagFound) {
|
||||
tagFound = tagFound[1];
|
||||
tagFound = tagFound[2];
|
||||
// We search only for exact match
|
||||
$scope.navigatedTag = _.findWhere($scope.tags, { name: tagFound });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user