PluginPrintRemover.py

changeset 14
039f86a49919
parent 11
cd82d92e927d
child 15
2096afa1756f
equal deleted inserted replaced
12:c39bbbbb8ce8 14:039f86a49919
261 if not pattern: 261 if not pattern:
262 return 262 return
263 263
264 text = editor.text() 264 text = editor.text()
265 newText = "".join([ 265 newText = "".join([
266 line for line in text.splitlines(keepends=True) 266 line for line in text.splitlines(True)
267 if not line.lstrip().startswith(pattern) or 267 if not line.lstrip().startswith(pattern) or
268 "__NO_REMOVE__" in line 268 "__NO_REMOVE__" in line
269 ]) 269 ])
270 if newText != text: 270 if newText != text:
271 editor.beginUndoAction() 271 editor.beginUndoAction()

eric ide

mercurial