Skip to content

Commit df691ee

Browse files
authored
Use hyphens for bulleted lists (#2138)
1 parent e1448c4 commit df691ee

File tree

12 files changed

+74
-73
lines changed

12 files changed

+74
-73
lines changed

.markdownlint.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// For information on writing markdownlint configuration see:
22
// https://github.com/DavidAnson/markdownlint/blob/main/README.md#optionsconfig
33
{
4+
"MD004": "dash", // Prefer hyphens for unordered lists
45
"MD013": false, // Exercism tends to break lines at sentence ends rather than at a column limit
56
"MD024": false // The format for instructions.md requires repeated headings, e.g. "Task"
67
}

exercises/allergies/description.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ An allergy test produces a single numeric score which contains the information a
66

77
The list of items (and their value) that were tested are:
88

9-
* eggs (1)
10-
* peanuts (2)
11-
* shellfish (4)
12-
* strawberries (8)
13-
* tomatoes (16)
14-
* chocolate (32)
15-
* pollen (64)
16-
* cats (128)
9+
- eggs (1)
10+
- peanuts (2)
11+
- shellfish (4)
12+
- strawberries (8)
13+
- tomatoes (16)
14+
- chocolate (32)
15+
- pollen (64)
16+
- cats (128)
1717

1818
So if Tom is allergic to peanuts and chocolate, he gets a score of 34.
1919

2020
Now, given just that score of 34, your program should be able to say:
2121

22-
* Whether Tom is allergic to any one of those allergens listed above.
23-
* All the allergens Tom is allergic to.
22+
- Whether Tom is allergic to any one of those allergens listed above.
23+
- All the allergens Tom is allergic to.
2424

2525
Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.).
2626
Your program should ignore those components of the score.

exercises/bowling/description.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ The game consists of 10 frames.
1111
A frame is composed of one or two ball throws with 10 pins standing at frame initialization.
1212
There are three cases for the tabulation of a frame.
1313

14-
* An open frame is where a score of less than 10 is recorded for the frame.
14+
- An open frame is where a score of less than 10 is recorded for the frame.
1515
In this case the score for the frame is the number of pins knocked down.
1616

17-
* A spare is where all ten pins are knocked down by the second throw.
17+
- A spare is where all ten pins are knocked down by the second throw.
1818
The total value of a spare is 10 plus the number of pins knocked down in their next throw.
1919

20-
* A strike is where all ten pins are knocked down by the first throw.
20+
- A strike is where all ten pins are knocked down by the first throw.
2121
The total value of a strike is 10 plus the number of pins knocked down in the next two throws.
2222
If a strike is immediately followed by a second strike, then the value of the first strike cannot be determined until the ball is thrown one more time.
2323

@@ -50,7 +50,7 @@ For a tenth frame of XXX (three strikes), the total value is 30.
5050
Write code to keep track of the score of a game of bowling.
5151
It should support two operations:
5252

53-
* `roll(pins : int)` is called each time the player rolls a ball.
53+
- `roll(pins : int)` is called each time the player rolls a ball.
5454
The argument is the number of pins knocked down.
55-
* `score() : int` is called only at the very end of the game.
55+
- `score() : int` is called only at the very end of the game.
5656
It returns the total score for that game.

exercises/darts/description.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Write a function that returns the earned points in a single toss of a Darts game
66

77
In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands:
88

9-
* If the dart lands outside the target, player earns no points (0 points).
10-
* If the dart lands in the outer circle of the target, player earns 1 point.
11-
* If the dart lands in the middle circle of the target, player earns 5 points.
12-
* If the dart lands in the inner circle of the target, player earns 10 points.
9+
- If the dart lands outside the target, player earns no points (0 points).
10+
- If the dart lands in the outer circle of the target, player earns 1 point.
11+
- If the dart lands in the middle circle of the target, player earns 5 points.
12+
- If the dart lands in the inner circle of the target, player earns 10 points.
1313

1414
The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1.
1515
Of course, they are all centered at the same point (that is, the circles are [concentric][] defined by the coordinates (0, 0).

exercises/diamond/description.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Given a letter, it prints a diamond starting with 'A', with the supplied letter
55

66
## Requirements
77

8-
* The first row contains one 'A'.
9-
* The last row contains one 'A'.
10-
* All rows, except the first and last, have exactly two identical letters.
11-
* All rows have as many trailing spaces as leading spaces. (This might be 0).
12-
* The diamond is horizontally symmetric.
13-
* The diamond is vertically symmetric.
14-
* The diamond has a square shape (width equals height).
15-
* The letters form a diamond shape.
16-
* The top half has the letters in ascending order.
17-
* The bottom half has the letters in descending order.
18-
* The four corners (containing the spaces) are triangles.
8+
- The first row contains one 'A'.
9+
- The last row contains one 'A'.
10+
- All rows, except the first and last, have exactly two identical letters.
11+
- All rows have as many trailing spaces as leading spaces. (This might be 0).
12+
- The diamond is horizontally symmetric.
13+
- The diamond is vertically symmetric.
14+
- The diamond has a square shape (width equals height).
15+
- The letters form a diamond shape.
16+
- The top half has the letters in ascending order.
17+
- The bottom half has the letters in descending order.
18+
- The four corners (containing the spaces) are triangles.
1919

2020
## Examples
2121

exercises/dnd-character/description.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Write a random character generator that follows the rules above.
1313

1414
For example, the six throws of four dice may look like:
1515

16-
* 5, 3, 1, 6: You discard the 1 and sum 5 + 3 + 6 = 14, which you assign to strength.
17-
* 3, 2, 5, 3: You discard the 2 and sum 3 + 5 + 3 = 11, which you assign to dexterity.
18-
* 1, 1, 1, 1: You discard the 1 and sum 1 + 1 + 1 = 3, which you assign to constitution.
19-
* 2, 1, 6, 6: You discard the 1 and sum 2 + 6 + 6 = 14, which you assign to intelligence.
20-
* 3, 5, 3, 4: You discard the 3 and sum 5 + 3 + 4 = 12, which you assign to wisdom.
21-
* 6, 6, 6, 6: You discard the 6 and sum 6 + 6 + 6 = 18, which you assign to charisma.
16+
- 5, 3, 1, 6: You discard the 1 and sum 5 + 3 + 6 = 14, which you assign to strength.
17+
- 3, 2, 5, 3: You discard the 2 and sum 3 + 5 + 3 = 11, which you assign to dexterity.
18+
- 1, 1, 1, 1: You discard the 1 and sum 1 + 1 + 1 = 3, which you assign to constitution.
19+
- 2, 1, 6, 6: You discard the 1 and sum 2 + 6 + 6 = 14, which you assign to intelligence.
20+
- 3, 5, 3, 4: You discard the 3 and sum 5 + 3 + 4 = 12, which you assign to wisdom.
21+
- 6, 6, 6, 6: You discard the 6 and sum 6 + 6 + 6 = 18, which you assign to charisma.
2222

2323
Because constitution is 3, the constitution modifier is -4 and the hitpoints are 6.
2424

exercises/linked-list/description.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ You will write an implementation of a doubly linked list.
1313
Implement a Node to hold a value and pointers to the next and previous nodes.
1414
Then implement a List which holds references to the first and last node and offers an array-like interface for adding and removing items:
1515

16-
* `push` (*insert value at back*);
17-
* `pop` (*remove value at back*);
18-
* `shift` (*remove value at front*).
19-
* `unshift` (*insert value at front*);
16+
- `push` (*insert value at back*);
17+
- `pop` (*remove value at back*);
18+
- `shift` (*remove value at front*).
19+
- `unshift` (*insert value at front*);
2020

2121
To keep your implementation simple, the tests will not cover error conditions.
2222
Specifically: `pop` or `shift` will never be called on an empty list.

exercises/list-ops/description.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Implement a series of basic list operations, without using existing functions.
77

88
The precise number and names of the operations to be implemented will be track dependent to avoid conflicts with existing names, but the general operations you will implement include:
99

10-
* `append` (*given two lists, add all items in the second list to the end of the first list*);
11-
* `concatenate` (*given a series of lists, combine all items in all lists into one flattened list*);
12-
* `filter` (*given a predicate and a list, return the list of all items for which `predicate(item)` is True*);
13-
* `length` (*given a list, return the total number of items within it*);
14-
* `map` (*given a function and a list, return the list of the results of applying `function(item)` on all items*);
15-
* `foldl` (*given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left using `function(accumulator, item)`*);
16-
* `foldr` (*given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using `function(item, accumulator)`*);
17-
* `reverse` (*given a list, return a list with all the original items, but in reversed order*);
10+
- `append` (*given two lists, add all items in the second list to the end of the first list*);
11+
- `concatenate` (*given a series of lists, combine all items in all lists into one flattened list*);
12+
- `filter` (*given a predicate and a list, return the list of all items for which `predicate(item)` is True*);
13+
- `length` (*given a list, return the total number of items within it*);
14+
- `map` (*given a function and a list, return the list of the results of applying `function(item)` on all items*);
15+
- `foldl` (*given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left using `function(accumulator, item)`*);
16+
- `foldr` (*given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using `function(item, accumulator)`*);
17+
- `reverse` (*given a list, return a list with all the original items, but in reversed order*);

exercises/micro-blog/description.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ The task is to truncate input strings to 5 characters.
1616
Text stored digitally has to be converted to a series of bytes.
1717
There are 3 ways to map characters to bytes in common use.
1818

19-
* **ASCII** can encode English language characters.
19+
- **ASCII** can encode English language characters.
2020
All characters are precisely 1 byte long.
21-
* **UTF-8** is a Unicode text encoding.
21+
- **UTF-8** is a Unicode text encoding.
2222
Characters take between 1 and 4 bytes.
23-
* **UTF-16** is a Unicode text encoding.
23+
- **UTF-16** is a Unicode text encoding.
2424
Characters are either 2 or 4 bytes long.
2525

2626
UTF-8 and UTF-16 are both Unicode encodings which means they're capable of representing a massive range of characters including:
2727

28-
* Text in most of the world's languages and scripts
29-
* Historic text
30-
* Emoji
28+
- Text in most of the world's languages and scripts
29+
- Historic text
30+
- Emoji
3131

3232
UTF-8 and UTF-16 are both variable length encodings, which means that different characters take up different amounts of space.
3333

exercises/resistor-color-duo/description.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
44
For this exercise, you need to know two things about them:
55

6-
* Each resistor has a resistance value.
7-
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
6+
- Each resistor has a resistance value.
7+
- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
88

99
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
1010
Each band has a position and a numeric value.
@@ -17,16 +17,16 @@ The program will take color names as input and output a two digit number, even i
1717

1818
The band colors are encoded as follows:
1919

20-
* Black: 0
21-
* Brown: 1
22-
* Red: 2
23-
* Orange: 3
24-
* Yellow: 4
25-
* Green: 5
26-
* Blue: 6
27-
* Violet: 7
28-
* Grey: 8
29-
* White: 9
20+
- Black: 0
21+
- Brown: 1
22+
- Red: 2
23+
- Orange: 3
24+
- Yellow: 4
25+
- Green: 5
26+
- Blue: 6
27+
- Violet: 7
28+
- Grey: 8
29+
- White: 9
3030

3131
From the example above:
3232
brown-green should return 15

0 commit comments

Comments
 (0)