Skip to content

Commit 214e75c

Browse files
committed
use soft spaces for single space characters, even in code blocks
1 parent e50a987 commit 214e75c

11 files changed

Lines changed: 43 additions & 51 deletions

File tree

data/test/markdown/code-block.20.txt

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
This is a code
22
block:
33

4-
def opposite:
5-
6-
Dir -> Dir
7-
=
8-
\d.
4+
def opposite:
5+
Dir -> Dir
6+
= \d.
97
if (d == left) {
108

119
right
1210
} {left}
1311
end
1412

15-
def x:
13+
def x:
1614
Int ->
1715
Cmd Unit ->
18-
Cmd Unit
19-
= \n.
20-
\c.
16+
Cmd Unit
17+
= \n. \c.
2118
if (n == 0) {} {
2219

2320
c;
@@ -34,10 +31,8 @@ def goTrade =
3431
pure ()
3532
end
3633

37-
def fig8half:
38-
39-
Dir -> Cmd Unit
40-
34+
def fig8half:
35+
Dir -> Cmd Unit
4136
= \d.
4237
x 3 (
4338
turn d;
@@ -46,9 +41,8 @@ def fig8half:
4641
goTrade
4742
end
4843

49-
def fig8:
50-
Dir ->
51-
Cmd Unit
44+
def fig8:
45+
Dir -> Cmd Unit
5246
= \d.
5347
turn back;
5448
fig8half (
@@ -67,7 +61,7 @@ def solution =
6761
x 5 (grab; m2);
6862
x 2 (
6963
turn
70-
left;
64+
left;
7165
m2
7266
);
7367
m5;

data/test/markdown/code-block.30.txt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
This is a code block:
22

3-
def opposite: Dir -> Dir
4-
=
5-
\d.
3+
def opposite: Dir -> Dir
4+
= \d.
65
if (d == left) {right} {
76

87
left
98
}
109
end
1110

12-
def x:
11+
def x:
1312
Int -> Cmd Unit ->
14-
Cmd Unit
13+
Cmd Unit
1514
= \n. \c.
1615
if (n == 0) {} {
1716
c;
@@ -27,16 +26,14 @@ def goTrade =
2726
pure ()
2827
end
2928

30-
def fig8half: Dir -> Cmd Unit
31-
29+
def fig8half: Dir -> Cmd Unit
3230
= \d.
3331
x 3 (turn d; goTrade);
3432
goTrade
3533
end
3634

37-
def fig8: Dir -> Cmd Unit
38-
=
39-
\d.
35+
def fig8: Dir -> Cmd Unit
36+
= \d.
4037
turn back;
4138
fig8half (opposite d);
4239
fig8half d;

data/test/markdown/code-block.40.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
This is a code block:
22

3-
def opposite: Dir -> Dir
3+
def opposite: Dir -> Dir
44
= \d.
55
if (d == left) {right} {left}
66
end
77

8-
def x: Int -> Cmd Unit -> Cmd Unit
9-
=
10-
\n. \c.
8+
def x: Int -> Cmd Unit -> Cmd Unit
9+
= \n. \c.
1110
if (n == 0) {} {c; x (n - 1) c}
1211
end
1312

@@ -16,13 +15,13 @@ def m5 = x 5 move end
1615
def goTrade = m5; drill down; pure ()
1716
end
1817

19-
def fig8half: Dir -> Cmd Unit
18+
def fig8half: Dir -> Cmd Unit
2019
= \d.
2120
x 3 (turn d; goTrade);
2221
goTrade
2322
end
2423

25-
def fig8: Dir -> Cmd Unit
24+
def fig8: Dir -> Cmd Unit
2625
= \d.
2726
turn back;
2827
fig8half (opposite d);

data/test/markdown/code-block.50.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
This is a code block:
22

3-
def opposite: Dir -> Dir
3+
def opposite: Dir -> Dir
44
= \d.
55
if (d == left) {right} {left}
66
end
77

8-
def x: Int -> Cmd Unit -> Cmd Unit
8+
def x: Int -> Cmd Unit -> Cmd Unit
99
= \n. \c.
1010
if (n == 0) {} {c; x (n - 1) c}
1111
end
@@ -14,13 +14,13 @@ def m5 = x 5 move end
1414

1515
def goTrade = m5; drill down; pure () end
1616

17-
def fig8half: Dir -> Cmd Unit
17+
def fig8half: Dir -> Cmd Unit
1818
= \d.
1919
x 3 (turn d; goTrade);
2020
goTrade
2121
end
2222

23-
def fig8: Dir -> Cmd Unit
23+
def fig8: Dir -> Cmd Unit
2424
= \d.
2525
turn back;
2626
fig8half (opposite d);

data/test/markdown/code-block.60.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This is a code block:
33
def opposite: Dir -> Dir = \d. if (d == left) {right} {left}
44
end
55

6-
def x: Int -> Cmd Unit -> Cmd Unit
6+
def x: Int -> Cmd Unit -> Cmd Unit
77
= \n. \c.
88
if (n == 0) {} {c; x (n - 1) c}
99
end
@@ -12,13 +12,13 @@ def m5 = x 5 move end
1212

1313
def goTrade = m5; drill down; pure () end
1414

15-
def fig8half: Dir -> Cmd Unit
15+
def fig8half: Dir -> Cmd Unit
1616
= \d.
1717
x 3 (turn d; goTrade);
1818
goTrade
1919
end
2020

21-
def fig8: Dir -> Cmd Unit
21+
def fig8: Dir -> Cmd Unit
2222
= \d.
2323
turn back;
2424
fig8half (opposite d);

data/test/markdown/code-block.70.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This is a code block:
22

33
def opposite: Dir -> Dir = \d. if (d == left) {right} {left} end
44

5-
def x: Int -> Cmd Unit -> Cmd Unit
5+
def x: Int -> Cmd Unit -> Cmd Unit
66
= \n. \c.
77
if (n == 0) {} {c; x (n - 1) c}
88
end
@@ -13,7 +13,7 @@ def goTrade = m5; drill down; pure () end
1313

1414
def fig8half: Dir -> Cmd Unit = \d. x 3 (turn d; goTrade); goTrade end
1515

16-
def fig8: Dir -> Cmd Unit
16+
def fig8: Dir -> Cmd Unit
1717
= \d.
1818
turn back;
1919
fig8half (opposite d);

data/test/markdown/code-block.80.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def goTrade = m5; drill down; pure () end
1010

1111
def fig8half: Dir -> Cmd Unit = \d. x 3 (turn d; goTrade); goTrade end
1212

13-
def fig8: Dir -> Cmd Unit
13+
def fig8: Dir -> Cmd Unit
1414
= \d.
1515
turn back;
1616
fig8half (opposite d);

data/test/markdown/simple.44.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This is a Markdown file. It has some inline
2-
code and a code block:
2+
code and a code block:
33

44
def main: Cmd Unit =
55
move;

data/test/markdown/simple.45.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This is a Markdown file. It has some inline
2-
code and a code block:
2+
code and a code block:
33

44
def main: Cmd Unit = move; move; place "rock"
55
end

data/test/markdown/simple.7.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ n file.
55
It has
66
some
77
inline
8-
code
8+
code
99
and a
1010
code
1111
block:
1212

1313
def
14-
main:
15-
14+
main:
1615
Cmd
17-
Unit =
16+
Unit =
1817
move;
1918
move;
2019
place
21-
"rock"
20+
"rock"
2221
end
2322

2423
Here is

0 commit comments

Comments
 (0)