Skip to content

Commit 7cf3ff8

Browse files
committed
docs: doc -ignore-first-empty-lines option (+test)
1 parent 6013ca0 commit 7cf3ff8

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

docs/basic/normalize-whitespace.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ Some indented line
9797
Some indented line
9898
```
9999

100+
> *New* in `byexample 11.0.0`: before `11.0.0` it was up to the user to
101+
> put a <...> or similar to ignore the empty lines at the begin (or use
102+
> `+rm=~` combined with `+norm-ws`).
103+
> Since `11.0.0` this is the default. If you want to old behavior you
104+
> can use the flag `-ignore-first-empty-lines`
105+
100106
<!--
101107
102108
Test a few more combinations
@@ -108,6 +114,6 @@ Test the incorrect combinations and check that they are actually failing
108114
109115
$ byexample -l python test/bad-empty-line.md
110116
<...>
111-
[FAIL] Pass: 0 Fail: 2 Skip: 0
117+
[FAIL] Pass: 0 Fail: 3 Skip: 0
112118
113119
-->

test/bad-empty-line.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ Some line
55

66
>>> print("\n \n Some line") # should fail (missing indentation)
77
Some line
8+
9+
>>> print("\n \nSome line") # should fail because we are using pre-11.0.0 behavour # byexample: -ignore-first-empty-lines
10+
Some line
811
```

0 commit comments

Comments
 (0)