• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

tidy tool for Template Toolkit


Commit MetaInfo

Revisão462ee6aa833ff03fa02321c549a8d65c12e69707 (tree)
Hora2015-08-18 19:32:50
Autorhylom <hylom@user...>
Commiterhylom

Mensagem de Log

fix Indenter._line_scan for more precise syntax scan

Mudança Sumário

Diff

--- a/tttidy.py
+++ b/tttidy.py
@@ -29,7 +29,8 @@ class Indenter(object):
2929 self.debug = debug
3030
3131 def debug_print(self, s):
32- sys.stderr.write(s + '\n')
32+ if self.debug:
33+ sys.stderr.write(s + '\n')
3334
3435 def reset(self):
3536 self._in_template = False
@@ -69,7 +70,7 @@ class Indenter(object):
6970 else:
7071 cursor = m.start()
7172 offset = m.end() - m.start()
72- body = line[:cursor]
73+ body = line[:cursor].rstrip() + ';'
7374 offset = 2
7475 rest = line[cursor + offset:]
7576 self._in_template = False