Skip to content

Commit 0ab6f7f

Browse files
committedNov 24, 2020
run prettier
1 parent 42578c8 commit 0ab6f7f

11 files changed

+36
-115
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
.grunt
33
/_book/
4+
.vscode

‎README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
Learn Markdown
2-
========
1+
# Learn Markdown
32

43
You may have heard about Markdown, if you have it's a good thing.
54

65
Markdown is a plain text formatting syntax designed so that it can optionally be converted to HTML.
76

87
In this book, you'll learn how to write document using the markdown syntax.
98

10-
[![Figure 1](./assets/preview.png)](./assets/preview.png)
11-
12-
Figure 1: Example of markdown with associated output document on the right.
13-
9+
![Example of markdown with associated output document on the right](./assets/preview.png)

‎SUMMARY.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Summary
22

3-
* [About Markdown](about/README.md)
4-
* [Titles](syntax/titles.md)
5-
* [Links](syntax/links.md)
6-
* [Images](syntax/images.md)
7-
* [Code Blocks](syntax/code.md)
8-
* [Tables](syntax/tables.md)
9-
3+
- [About Markdown](about/README.md)
4+
- [Titles](syntax/titles.md)
5+
- [Links](syntax/links.md)
6+
- [Images](syntax/images.md)
7+
- [Code Blocks](syntax/code.md)
8+
- [Tables](syntax/tables.md)

‎book.json

-5
This file was deleted.

‎cover.jpg

-237 KB
Binary file not shown.

‎cover_small.jpg

-18.6 KB
Binary file not shown.

‎syntax/code.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Pre-formatted code blocks are used for writing about programming or markup sourc
44

55
Here is an example:
66

7-
```
7+
```markdown
88
This is a code block
99
```
1010

1111
To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab.
1212

1313
For example:
1414

15-
```
15+
```markdown
1616
This is a normal paragraph:
1717

1818
This is a code block.
@@ -34,7 +34,6 @@ For example:
3434

3535
You can define the language to be used for syntax highlighting by adding the name on the opening tag. Example:
3636

37-
```js
37+
```javascript
3838
var a = {};
3939
```
40-

‎syntax/images.md

+6-23
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,16 @@
22

33
```markdown
44
# Inline
5+
56
![Alternative text](/path/to/img.jpg "Optional title")
67

78
# Reference
9+
810
![Alternative text][id]
9-
[id]: url/to/image "Optional title"
11+
[id]: url/to/image "Optional title"
1012
```
11-
As you may have noticed, images in Markdown are very similar to links. The difference is that:
12-
* the square brackets must be prefixed with an exclamation mark and
13-
* inside they may have some alternative text. A description of the image, which is displayed if the image can't be loaded.
14-
15-
---
16-
17-
Here's a quiz about markdown images.
18-
19-
Select the valid images:
20-
- [ ] `[Google logo](https://www.google.ru/logo.png)`
21-
- [x] `![](https://www.google.ru/logo.png)`
22-
23-
> Images must be prefixed with an exclamation mark.
24-
The alternative text and a title are optional.
25-
26-
What is true about the following line: ```![Funny cat](http://cats.ru/funny.png "Share this")```
27-
- [x] if the url is 404, "Funny cat" will be displayed
28-
- [ ] exclamation mark can be omitted in this case
29-
- [ ] if the url is 404, "Share this" will be displayed
30-
- [x] on mouse over the image "Share this" will be displayed
3113

32-
> Similarly to links, images can have 3 parts: the alternative text, the url and a title. An exclamation mark is nesessary.
14+
As you may have noticed, images in Markdown are very similar to links. The difference is that:
3315

34-
---
16+
- the square brackets must be prefixed with an exclamation mark and
17+
- inside they may have some alternative text. A description of the image, which is displayed if the image can't be loaded.

‎syntax/links.md

+6-24
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,33 @@ Markdown supports two styles of links: inline and reference.
55
In both styles, the link text is delimited by [square brackets].
66

77
To create an inline link, use a set of regular parentheses immediately after the link text’s closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:
8+
89
```markdown
910
[I'm an inline-style link](https://www.google.com)
1011

1112
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
1213

13-
[I'm a reference-style link][Arbitrary case-insensitive reference text]
14+
[I'm a reference-style link][arbitrary case-insensitive reference text]
1415

1516
[I'm a relative reference to a repository file](../blob/master/LICENSE)
1617
```
1718

1819
Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:
20+
1921
```markdown
2022
This is [an example][id] reference-style link.
2123
```
2224

2325
You can optionally use a space to separate the sets of brackets:
26+
2427
```markdown
2528
This is [an example] [id] reference-style link.
2629
```
2730

2831
Then, anywhere in the document, you define your link label like this, on a line by itself:
32+
2933
```markdown
30-
[id]: http://example.com/ "Optional Title Here"
34+
[id]: http://example.com/ "Optional Title Here"
3135
```
3236

3337
**GitHub** and **GitBook** supports URL autolinking. They will autolink standard URLs, so if you want to link to a URL (instead of setting link text), you can simply enter the URL and it will be turned into a link to that URL.
34-
35-
36-
---
37-
38-
Here's a quiz about markdown links.
39-
40-
Select the valid links:
41-
- [x] `[a link](http://google.fr)`
42-
- [ ] `(a link)[http://google.fr]`
43-
44-
> The link text is delimited by [square brackets].
45-
46-
What are the correct informations from this link: ```[a link](http://google.fr "google")```
47-
- [ ] the link is https://google.fr
48-
- [x] the title of the link is "google"
49-
- [ ] it'll show the text "google"
50-
- [x] it'll show the text "a link"
51-
52-
> Links can have 3 parts: the text, the url and a title.
53-
54-
---
55-

‎syntax/tables.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ Here is an example of table with the output below:
1010
| col 2 is | centered | $12 |
1111
| zebra stripes | are neat | $1 |
1212

13-
14-
| Tables | Are | Cool |
15-
| ------------- |:-------------:| -----:|
13+
| Tables | Are | Cool |
14+
| ------------- | :-----------: | ----: |
1615
| col 3 is | right-aligned | $1600 |
17-
| col 2 is | centered | $12 |
18-
| zebra stripes | are neat | $1 |
16+
| col 2 is | centered | $12 |
17+
| zebra stripes | are neat | $1 |
1918

2019
Colons can be used to align columns.
2120

@@ -27,4 +26,3 @@ Example:
2726
--- | --- | ---
2827
*Still* | `renders` | **nicely**
2928
1 | 2 | 3
30-

‎syntax/titles.md

+8-40
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,30 @@ Markdown supports two styles of headers, Setext and atx.
66

77
Setext-style headers are “underlined” using equal signs (for first-level headers) and dashes (for second-level headers). For example:
88

9-
```
10-
This is an H1
11-
=============
9+
```markdown
10+
# This is an H1
1211

13-
This is an H2
14-
-------------
12+
## This is an H2
1513
```
1614

1715
Any number of underlining =’s or -’s will work.
1816

1917
Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:
2018

21-
```
19+
```markdown
2220
# This is an H1
2321

2422
## This is an H2
2523

2624
###### This is an H6
2725
```
2826

29-
3027
Optionally, you may “close” atx-style headers. This is purely cosmetic — you can use this if you think it looks better. The closing hashes don’t even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :
3128

32-
```
33-
# This is an H1 #
34-
35-
## This is an H2 ##
36-
37-
### This is an H3 ######
38-
```
39-
40-
41-
---
42-
43-
Here's a quiz about markdown titles.
44-
45-
Select the valid headers:
46-
- [x] `# hello`
47-
- [ ] `#hello`
29+
```markdown
30+
# This is an H1
4831

49-
> Headers need space between the hash characters and the text.
32+
## This is an H2
5033

51-
Select the valid headers:
52-
- [ ]
53-
```
54-
test
55-
########
56-
```
57-
- [x]
34+
### This is an H3
5835
```
59-
test
60-
=======
61-
```
62-
63-
> Only '=' and '-' are accepted for underlining an header.
64-
65-
---
66-
67-

0 commit comments

Comments
 (0)
Please sign in to comment.