Skip to content

Commit

Permalink
all: minor description.md formatting fixes (#915)
Browse files Browse the repository at this point in the history
* Code fences should use ```text``` for display regular text.
https://github.com/github/linguist/blob/master/lib/linguist/languages.yml

* Remove some HTML tags laying around.

* Normalize multiple consecutive blanks lines at the end of the document.

* Remove extra white spaces at the end of the line.

* Fenced code blocks should have a language specified.

* Multiple consecutive blank lines.

* Headers should be surrounded by blank lines

* Fenced code blocks should be surrounded by blank lines

* Minor fixes.

* Minor changes.
  • Loading branch information
navossoc authored and rpottsoh committed Oct 2, 2017
1 parent 4e9b4e4 commit e7a596c
Show file tree
Hide file tree
Showing 62 changed files with 192 additions and 180 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ the Exercism ecosystem.
Each language-specific repository can be found under the Exercism GitHub
organization named with the track ID.

```
```text
https://github.com/exercism/{TRACK_ID}
```

Expand Down Expand Up @@ -241,7 +241,7 @@ A problem must have a unique slug. This slug is used as

Each track should have the following structure:

```bash
```text
├── .gitignore
├── .travis.yml
├── LICENSE
Expand Down Expand Up @@ -295,7 +295,7 @@ For a track that is set as `"active": false` in the `config.json`, `exercism fet
will not automatically pull down problems. You can still test the language by
fetching problems directly, e.g.:

```
```shell
exercism fetch cpp bob
```

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please see the [contributing guide](https://github.com/exercism/problem-specific

Each problem's data lives in a directory under `exercises/`

```
```text
exercises/
├── accumulate
│   ├── description.md
Expand Down Expand Up @@ -169,17 +169,21 @@ In order to run these tests, you will need to have `node` and `npm` installed on
Install them from [here](https://nodejs.org/en/). (`npm` comes bundled with most installations of `node`).

Install the required packages:

```shell
npm install
```

Run for all exercises:

```shell
npm test
```

Run for single exercise:

```shell
npm run test-one exercises/<exercise>/canonical-data.json
```

Replace `<exercise>` by the name of exercise which you want to check.
1 change: 0 additions & 1 deletion exercises/acronym/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Techies love their TLA (Three Letter Acronyms)!

Help generate some jargon by writing a program that converts a long name
like Portable Network Graphics to its acronym (PNG).

2 changes: 1 addition & 1 deletion exercises/all-your-base/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Implement general base conversion. Given a number in base **a**,
represented as a sequence of digits, convert it to base **b**.

## Note

- Try to implement the conversion yourself.
Do not use something else to perform the conversion for you.

Expand All @@ -26,5 +27,4 @@ The number 1120, *in base 3*, means:

I think you got the idea!


*Yes. Those three numbers above are exactly the same. Congratulations!*
1 change: 0 additions & 1 deletion exercises/allergies/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ Note: a given score may include allergens **not** listed above (i.e.
allergens that score 256, 512, 1024, etc.). Your program should
ignore those components of the score. For example, if the allergy
score is 257, your program should only report the eggs (1) allergy.

4 changes: 2 additions & 2 deletions exercises/alphametics/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ letters in words are replaced with numbers.

For example `SEND + MORE = MONEY`:

```
```text
S E N D
M O R E +
-----------
Expand All @@ -14,7 +14,7 @@ M O N E Y

Replacing these with valid numbers gives:

```
```text
9 5 6 7
1 0 8 5 +
-----------
Expand Down
3 changes: 2 additions & 1 deletion exercises/atbash-cipher/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ letter, the second with the second-last, and so on.

An Atbash cipher for the Latin alphabet would be as follows:

```plain
```text
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: zyxwvutsrqponmlkjihgfedcba
```
Expand All @@ -21,6 +21,7 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess
things based on word boundaries.

## Examples

- Encoding `test` gives `gvhg`
- Decoding `gvhg` gives `test`
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
2 changes: 1 addition & 1 deletion exercises/beer-song/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles

Note that not all verses are identical.

```plain
```text
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
Expand Down
2 changes: 2 additions & 0 deletions exercises/binary/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ string, your program should produce a decimal output. The
program should handle invalid inputs.

## Note

- Implement the conversion yourself.
Do not use something else to perform the conversion for you.

## About Binary (Base-2)

Decimal is a base-10 system.

A number 23 in base 10 notation can be understood
Expand Down
10 changes: 5 additions & 5 deletions exercises/book-store/description.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
To try and encourage more sales of different books from a popular 5 book
series, a bookshop has decided to offer discounts on multiple book purchases.

One copy of any of the five books costs $8.
One copy of any of the five books costs $8.

If, however, you buy two different books, you get a 5%
discount on those two books.

If you buy 3 different books, you get a 10% discount.
If you buy 3 different books, you get a 10% discount.

If you buy 4 different books, you get a 20% discount.

If you buy all 5, you get a 25% discount.
If you buy all 5, you get a 25% discount.

Note: that if you buy four books, of which 3 are
different titles, you get a 10% discount on the 3 that
form part of a set, but the fourth book still costs $8.
form part of a set, but the fourth book still costs $8.

Your mission is to write a piece of code to calculate the
price of any conceivable shopping basket (containing only
Expand All @@ -28,7 +28,7 @@ For example, how much does this basket of books cost?
- 2 copies of the third book
- 1 copy of the fourth book
- 1 copy of the fifth book

One way of grouping these 8 books is:

- 1 group of 5 --> 25% discount (1st,2nd,3rd,4th,5th)
Expand Down
2 changes: 1 addition & 1 deletion exercises/collatz-conjecture/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ always reach 1 eventually.
Given a number n, return the number of steps required to reach 1.

## Examples

Starting with n = 12, the steps would be as follows:

0. 12
Expand All @@ -22,4 +23,3 @@ Starting with n = 12, the steps would be as follows:
9. 1

Resulting in 9 steps. So for input n = 12, the return value would be 9.

2 changes: 1 addition & 1 deletion exercises/connect/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
The boards look like this (with spaces added for readability, which won't be in
the representation passed to your code):

```
```text
. O . X .
. X X O .
O O O X .
Expand Down
8 changes: 4 additions & 4 deletions exercises/crypto-square/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and `r` is the number of rows.
Our normalized text is 54 characters long, dictating a rectangle with
`c = 8` and `r = 7`:

```plain
```text
ifmanwas
meanttos
tayonthe
Expand All @@ -39,22 +39,22 @@ right.

The message above is coded as:

```plain
```text
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
```

Output the encoded text in chunks. Phrases that fill perfect squares
`(r X r)` should be output in `r`-length chunks separated by spaces.
Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.

```plain
```text
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
```

Notice that were we to stack these, we could visually decode the
cyphertext back in to the original message:

```plain
```text
imtgdvs
fearwer
mayoogo
Expand Down
12 changes: 6 additions & 6 deletions exercises/diamond/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The diamond kata takes as its input a letter, and outputs it in a diamond
shape. Given a letter, it prints a diamond starting with 'A', with the
The diamond kata takes as its input a letter, and outputs it in a diamond
shape. Given a letter, it prints a diamond starting with 'A', with the
supplied letter at the widest point.

## Requirements
Expand All @@ -13,7 +13,7 @@ supplied letter at the widest point.
* The diamond has a square shape (width equals height).
* The letters form a diamond shape.
* The top half has the letters in ascending order.
* The bottom half has the letters in descending order.
* The bottom half has the letters in descending order.
* The four corners (containing the spaces) are triangles.

## Examples
Expand All @@ -22,13 +22,13 @@ In the following examples, spaces are indicated by `·` characters.

Diamond for letter 'A':

```plain
```text
A
```

Diamond for letter 'C':

```plain
```text
··A··
·B·B·
C···C
Expand All @@ -38,7 +38,7 @@ C···C

Diamond for letter 'E':

```plain
```text
····A····
···B·B···
··C···C··
Expand Down
2 changes: 2 additions & 0 deletions exercises/etl/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
We are going to do the `Transform` step of an Extract-Transform-Load.

### ETL

Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
we're going to migrate this."

Expand All @@ -9,6 +10,7 @@ once." That's then typically followed by much forehead slapping and
moaning about how stupid we could possibly be.)

### The goal

We're going to extract some scrabble scores from a legacy system.

The old system stored a list of letters per score:
Expand Down
3 changes: 1 addition & 2 deletions exercises/flatten-array/description.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Take a nested list and return a single flattened list with all values except nil/null.

The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.

For Example

input: [1,[2,3,null,4],[null],5]

output: [1,2,3,4,5]

2 changes: 1 addition & 1 deletion exercises/food-chain/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unk

This is one of many common variants.

```plain
```text
I know an old lady who swallowed a fly.
I don't know why she swallowed the fly. Perhaps she'll die.
Expand Down
2 changes: 1 addition & 1 deletion exercises/go-counting/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ only horizontal and vertical neighbours count. In the following diagram
the stones which matter are marked "O" and the stones that don't are
marked "I" (ignored). Empty spaces represent empty intersections.

```
```text
+----+
|IOOI|
|O O|
Expand Down
1 change: 0 additions & 1 deletion exercises/grade-school/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ In the end, you should be able to:
Note that all our students only have one name. (It's a small town, what
do you want?)


## For bonus points

Did you get the tests passing and the code clean? If you want to, these
Expand Down
1 change: 0 additions & 1 deletion exercises/grains/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Write code that shows:
- how many grains were on each square, and
- the total number of grains


## For bonus points

Did you get the tests passing and the code clean? If you want to, these
Expand Down
24 changes: 12 additions & 12 deletions exercises/grep/description.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Search a file for lines matching a regular expression pattern. Return the line
number and contents of each matching line.

The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
that match a user-provided search query (known as the *pattern*).

The `grep` command takes three arguments:

1. The pattern used to match lines in a file.
1. The pattern used to match lines in a file.
2. Zero or more flags to customize the matching behavior.
3. One or more files in which to search for matching lines.
3. One or more files in which to search for matching lines.

Your task is to implement the `grep` function, which should read the contents
of the specified files, find the lines that match the specified pattern
Expand All @@ -18,18 +18,18 @@ in the first file being output first.

As an example, suppose there is a file named "input.txt" with the following contents:

<pre>
```text
hello
world
hello again
</pre>
```

If we were to call `grep "hello" input.txt`, the returned string should be:

<pre>
```text
hello
hello again
</pre>
```

### Flags

Expand All @@ -44,18 +44,18 @@ As said earlier, the `grep` command should also support the following flags:
If we run `grep -n "hello" input.txt`, the `-n` flag will require the matching
lines to be prefixed with its line number:

<pre>
```text
1:hello
3:hello again
</pre>
```

And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
and the output will be:

<pre>
```text
hello
hello again
</pre>
```

The `grep` command should support multiple flags at once.

Expand Down
Loading

0 comments on commit e7a596c

Please sign in to comment.