MCPcopy Index your code
hub / github.com/chasingboy/Xtools / run

Method run

xtools.py:161–174  ·  view source on GitHub ↗
(self, edit)

Source from the content-addressed store, hash-verified

159
160class FilterDnsCdnDomainCommand(sublime_plugin.TextCommand):
161 def run(self, edit):
162 buffers = get_buffer_text(self.view)
163
164 text = buffers
165 black_text = []
166 for line in buffers.split('\n'):
167 for fd in filter_domains:
168 if fd in line or fd == line:
169 text = text.replace(line + '\n', '')
170 black_text.append(fd)
171
172 black_text = '\n'.join(list(set(black_text)))
173 text = "{0}\n\n# filter host:\n{1}".format(text,black_text)
174 update_file(self.view, edit, text)
175
176
177# URL And Router

Callers

nothing calls this directly

Calls 2

get_buffer_textFunction · 0.85
update_fileFunction · 0.85

Tested by

no test coverage detected