Skip to content

Commit

Permalink
4.3.1 Fixed evaluation of () (closes #131)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Nov 4, 2024
1 parent 521d2cf commit f640b21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 4.3.1 - Nov 4, 2024

- Fixed evaluation of `()` #131

### 4.3.0 - Oct 31, 2024

- Pretty print selection #123
Expand Down
2 changes: 1 addition & 1 deletion cs_cljfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def newline_indent(view, point):
child = child.body.children[0]
if child.name == 'parens':
body = child.body
if len(body.children) >= 2:
if body and len(body.children) >= 2:
first_form = body.children[0]
if first_form.name == 'token' and first_form.text == 'ns':
ns = child
Expand Down
4 changes: 2 additions & 2 deletions cs_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def namespace(view, point):
child = child.body.children[0]
if child.name == 'parens':
body = child.body
if len(body.children) >= 2:
if body and len(body.children) >= 2:
first_form = body.children[0]
if first_form.name == 'token' and first_form.text == 'ns':
second_form = body.children[1]
Expand All @@ -503,7 +503,7 @@ def defsym(node):
"""
if node.name == 'parens':
body = node.body
if len(body.children) >= 2:
if body and len(body.children) >= 2:
first_form = body.children[0]
if first_form.name == 'token' and re.fullmatch(r'(ns|([^/]+/)?def.*)', first_form.text):
second_form = body.children[1]
Expand Down

0 comments on commit f640b21

Please sign in to comment.