<commit_before>/**
 * Created by JM Organization on 10.08.2017.
 */

function search_news(news, filter) {
    $('.short-article').each(function () {
        var string = new RegExp(news, "ig");

        if ($(this).data('article').search(string) >= 0
            && news != ''
            && news != ' '
        ) {
            $(this).show();
        } else {
            $('.short-article').hide();
        }
    });
}
<commit_msg>fixes<commit_after>/**
 * Created by JM Organization on 10.08.2017.
 */

function search_news(news, filter) {
    $('.short-article').each(function () {
        var pattern = new RegExp(news, "ig");
        var search_string = $(this).data('article');

        if (news == '' && news == ' ') {
            if (search_string.match(pattern).index >= 0) {
                $(this).show();
            } else {
                $('.short-article').hide();
            }
        }
    });
}

{'fraction_non_alphanumeric': 0.19738276990185388, 'fraction_numerical': 0.019629225736095966, 'mean_word_length': 1.7240356083086052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6113883', 'n_tokens_mistral': 291, 'n_tokens_neox': 271, 'n_words': 52}