Skip to content

Commit

Permalink
Clarify indent levels of lists and update example
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jul 13, 2024
1 parent 3262b70 commit 4805825
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ No. Use your <kbd>Enter</kbd> key or refactor your code.
Consistently four spaces for each indentation level.
Standard code blocks (`function`, `for`, `while`, ...) all result an increase of the
indentation level until the closing `end`. Examples:
Standard code blocks (`function`, `for`, `while`, ...) all increase the indentation level
with 1 until the closing `end`. Examples:
```diff
function f()
- for i in 1:2
Expand All @@ -209,22 +209,28 @@ indentation level until the closing `end`. Examples:
```
Listlike expressions like e.g. tuples, function calls, array literals, etc. also increase
the indentation level until the closing token. This only has an effect if the list span
multiple lines. Examples:
the indentation level with 1 until the closing token. This only has an effect if the list
span multiple lines. Examples:
```diff
x = (
- a, b, c, d,
- e, f, g, h,
+ a, b, c, d,
+ e, f, g, h,
)
foo(
- a, b, c, d,
- e, f, g, h,
+ a, b, c, d,
+ e, f, g, h,
)
[
- a, b, c, d,
- e, f, g, h,
+ a, b, c, d,
+ e, f, g, h,
]
```
Expand Down

0 comments on commit 4805825

Please sign in to comment.