<commit_before>openNote.service("tagService", function ($rootScope,storageService) {
    var service = this;
    var tagRegex = /(?:\ |^|\n)(#[^\ <\n]*)/ig;

    /**
     * Bind handlers to the root scope
     */
    this.bindHandlers = function(){
        $rootScope.$on("noteSaved", function(event, note) {
            deleteTagsFromMap(note._id,function(){
                var results = note.note.match(tagRegex);
                if(!results||!results.length)
                    return;
                addTagsToMap(results,note._id);<commit_msg>Fixed bug with tags<commit_after>openNote.service("tagService", function ($rootScope,storageService) {
    var service = this;
    var tagRegex = /(?:\ |^|\n|>)(#[^\ <\n]*)/ig;

    /**
     * Bind handlers to the root scope
     */
    this.bindHandlers = function(){
        $rootScope.$on("noteSaved", function(event, note) {
            deleteTagsFromMap(note._id,function(){
                var results = note.note.match(tagRegex);
                if(!results||!results.length)
                    return;
                addTagsToMap(results,note._id);
{'fraction_non_alphanumeric': 0.1552346570397112, 'fraction_numerical': 0.0, 'mean_word_length': 2.261764705882353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2387248', 'n_tokens_mistral': 330, 'n_tokens_neox': 316, 'n_words': 58}