(self, edit)
| 141 | |
| 142 | class FilterDnsCdnHostCommand(sublime_plugin.TextCommand): |
| 143 | def run(self, edit): |
| 144 | text = get_buffer_text(self.view) |
| 145 | ips = text.replace(' ','').split('\n') |
| 146 | |
| 147 | text = '' |
| 148 | black_text = [] |
| 149 | for ip in ips: |
| 150 | if ip in filter_hosts: |
| 151 | black_text.append(ip) |
| 152 | else: |
| 153 | text += ip + '\n' |
| 154 | |
| 155 | black_text = '\n'.join(list(set(black_text))) |
| 156 | text = "{0}\n\n# filter host:\n{1}".format(text,black_text) |
| 157 | update_file(self.view, edit, text) |
| 158 | |
| 159 | |
| 160 | class FilterDnsCdnDomainCommand(sublime_plugin.TextCommand): |
nothing calls this directly
no test coverage detected