From: Don T. <nos...@gm...> - 2006-05-15 13:00:16
|
Fabio: I am having some problems with indenting in a Jython file. After I hit <enter> on some lines the editor places the indent about 28 characters in on the next line - it does not seem to align with anything obvious. If I then hit backspace then the cursor goes back 4 characters at a time but not to anywhere useful. I have to backspace enough and then enter some spaces to get to where I want to be. The following is a fragment of this file that exhibits this behaviour: class Paragrapher: def _analyzeLine(self, line): pattern = r'''(\s*#\s*|\s*"""\s*|''' \ + r"""\s*'''\s*|""" \ + r'''\s*"\s*|''' \ + r"""\s*'\s*|s*)""" compiledRe = re.compile(pattern) matched = compiledRe.match(line) leadingString = line[0:matched.end()] mainText = line[matched.end():] Try hitting enter on the last line. Don. |