381 return |
381 return |
382 |
382 |
383 lineSeparator = editor.getLineSeparator() |
383 lineSeparator = editor.getLineSeparator() |
384 editor.beginUndoAction() |
384 editor.beginUndoAction() |
385 if editor.hasSelectedText(): |
385 if editor.hasSelectedText(): |
386 startLine, startIndex, endLine, endIndex = editor.getSelection() |
386 startLine, _startIndex, endLine, endIndex = editor.getSelection() |
387 if endIndex == 0: |
387 if endIndex == 0: |
388 endLine -= 1 |
388 endLine -= 1 |
389 for line in range(startLine, endLine + 1): |
389 for line in range(startLine, endLine + 1): |
390 editor.insertAt("</li>", line, len(editor.text(line).rstrip())) |
390 editor.insertAt("</li>", line, len(editor.text(line).rstrip())) |
391 editor.insertAt(" <li>", line, 0) |
391 editor.insertAt(" <li>", line, 0) |