Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/incubator-zeppelin/pull/36#discussion_r28530958
--- Diff: spark/src/main/resources/python/zeppelin_pyspark.py ---
@@ -98,6 +98,10 @@ def reset(self):
continue
if s[0] != " " and s[0] != "\t":
+ if s.replace(" ", "").startswith("else:") or s.replace(" ",
"").startswith("elif") or s.replace(" ", "").startswith("except"):
--- End diff --
Whitespace is significant for Python, perhaps we shouldn't trim it out at
all.
it could be a function definition, a if-else, or anything else. It could
also be nested too:
```
>>> if foo:
... if bar:
... x = 42
... else:
... print foo
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---