PluginPrintRemover.py

changeset 15
2096afa1756f
parent 13
67844d930102
parent 14
039f86a49919
child 17
fdd903baddea
equal deleted inserted replaced
13:67844d930102 15:2096afa1756f
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