浏览代码

Added multiplication sign exception for left square bracket.

Taddeus Kroes 14 年之前
父节点
当前提交
262f3558aa
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      line.py

+ 1 - 1
line.py

@@ -170,7 +170,7 @@ def generate_line(root):
             r = e[1][0]
             left_simple = is_id(left) or is_int(left)
 
-            if (r == '(' and left_simple) or (l == ')' and r != '-') \
+            if (r in ('(', ']') and left_simple) or (l == ')' and r != '-') \
                     or (left_simple and r.isalpha()):
                 sep = ''