|
|
| words := "https?:\/\/(www\.)?autorskecteni\.cz"; | | words := "https?:\/\/"; |
| words_in_tags := '<(ref)\b[^<]+' + words + '[^<]*</\1>'; | | words_in_tags := '<(ref)\b[^<]+' + words + '[^<]*</\1>'; |
| | words_in_template := '({{[^{]*)+' + words + '[^}]*</}}>'; |
| old_count_simple := rcount(words, lcase(removed_lines)); | | old_count_simple := rcount(words, lcase(removed_lines)); |
| new_count_simple := rcount(words, lcase(added_lines)); | | new_count_simple := rcount(words, lcase(added_lines)); |
| old_count_tags := rcount(words_in_tags, lcase(removed_lines)); | | old_count_tags := rcount(words_in_tags, lcase(removed_lines)); |
| new_count_tags := rcount(words_in_tags, lcase(added_lines)); | | new_count_tags := rcount(words_in_tags, lcase(added_lines)); |
|
| |
|
| new_count_simple - new_count_tags > old_count_simple - old_count_tags | | new_count_simple - new_count_tags > old_count_simple - old_count_tags |
| & ( | | & ( |
| new_link_header := strpos(lcase(new_wikitext), "externí odkazy"); | | new_link_header := strpos(lcase(new_wikitext), "externí odkazy"); |
| new_link_header === false | | | new_link_header === false | |
| ( | | ( |
| new_after_text := substr(lcase(new_wikitext), new_link_header); | | new_after_text := substr(lcase(new_wikitext), new_link_header); |
| new_after_count := rcount(words, new_after_text); | | new_after_count := rcount(words, new_after_text); |
| old_link_header := strpos(lcase(old_wikitext), "externí odkazy"); | | old_link_header := strpos(lcase(old_wikitext), "externí odkazy"); |
| old_after_count := old_link_header !== false | | old_after_count := old_link_header !== false |
| ? rcount(words, substr(lcase(old_wikitext), old_link_header)) | | ? rcount(words, substr(lcase(old_wikitext), old_link_header)) |
| : 0; | | : 0; |
| (new_count_simple - new_count_tags) - (old_count_simple - old_count_tags) > new_after_count - old_after_count | | (new_count_simple - new_count_tags) - (old_count_simple - old_count_tags) > new_after_count - old_after_count |
| ) | | ) |
| ) | | ) |