Skip to content

Commit

Permalink
fix(packages/remark-capitalize-headings): use easier to understand ex…
Browse files Browse the repository at this point in the history
…amples
  • Loading branch information
Xunnamius committed Dec 6, 2022
1 parent 18d05fb commit 1311199
Showing 1 changed file with 88 additions and 48 deletions.
136 changes: 88 additions & 48 deletions packages/remark-capitalize-headings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,48 +269,62 @@ const file = await remark()
console.log(String(file));
```

Would output the following:
Would output the following compared to `example.md`:

```markdown
# My Documentation
```diff
-# my documentation
+# My Documentation

## Section 1 Is [the best](https://google.com)
-## Section 1 is [the best](https://google.com)
+## Section 1 Is [the best](https://google.com)

### Subsection A
-### Subsection a
+### Subsection A

### Subsection _A_
-### Subsection _a_
+### Subsection _A_

### Subsection \_a

### Subsection A: Be See
-### Subsection a: be see
+### Subsection A: Be See

### Subsection B
-### Subsection b
+### Subsection B

### Subsection C

## Section 2 Is the Test
-## section 2 is the test
+## Section 2 Is the Test

### Subsection 1
-### subsection 1
+### Subsection 1

### Subsection 2

#### `options.opt1`

#### `options.opt2`

#### Additional Option: `options.opt3`
-#### Additional option: `options.opt3`
+#### Additional Option: `options.opt3`

## Section 3 Has the Rest
-## Section 3 has the rest
+## Section 3 Has the Rest

### Subsection [a][1]

#### Sci-Fi Title Generator
-#### Sci-fi title generator
+#### Sci-Fi Title Generator

##### Children of Celeste
-##### children of celeste
+##### Children of Celeste

##### The Bionic Oblivion
-##### the bionic oblivion
+##### The Bionic Oblivion

##### Snows of Arrakis
-##### snows Of arrakis
+##### Snows of Arrakis

[1]: https://www.youtube.com/watch?v=dFs4yX4V7NQ
```
Expand All @@ -334,12 +348,14 @@ const file = await remark()
console.log(String(file));
```

Would output the following:
Would output the following compared to `example.md`:

```markdown
# My Documentation
```diff
-# my documentation
+# My Documentation

## Section 1 Is [the best](https://google.com)
-## Section 1 is [the best](https://google.com)
+## Section 1 Is [the best](https://google.com)

### Subsection a

Expand All @@ -353,7 +369,8 @@ Would output the following:

### Subsection C

## Section 2 Is the Test
-## section 2 is the test
+## Section 2 Is the Test

### subsection 1

Expand All @@ -365,17 +382,21 @@ Would output the following:

#### Additional option: `options.opt3`

## Section 3 Has the Rest
-## Section 3 has the rest
+## Section 3 Has the Rest

### Subsection [a][1]

#### Sci-fi title generator

##### Children of Celeste
-##### children of celeste
+##### Children of Celeste

##### The Bionic Oblivion
-##### the bionic oblivion
+##### The Bionic Oblivion

##### Snows of Arrakis
-##### snows Of arrakis
+##### Snows of Arrakis

[1]: https://www.youtube.com/watch?v=dFs4yX4V7NQ
```
Expand All @@ -400,12 +421,14 @@ const file = await remark()
console.log(String(file));
```

Would output the following:
Would output the following compared to `example.md`:

```markdown
# My Documentation
```diff
-# my documentation
+# My Documentation

## Section 1 Is [the best](https://google.com)
-## Section 1 is [the best](https://google.com)
+## Section 1 Is [the best](https://google.com)

### Subsection a

Expand All @@ -419,7 +442,8 @@ Would output the following:

### Subsection C

## Section 2 Is the Test
-## section 2 is the test
+## Section 2 Is the Test

### subsection 1

Expand All @@ -431,7 +455,8 @@ Would output the following:

#### Additional option: `options.opt3`

## Section 3 Has the Rest
-## Section 3 has the rest
+## Section 3 Has the Rest

### Subsection [a][1]

Expand Down Expand Up @@ -468,48 +493,63 @@ const file = await remark()
console.log(String(file));
```

Would output the following:
Would output the following compared to `example.md`:

```markdown
# My Documentation
```diff
-# my documentation
+# My Documentation

## Section 1 Is [the best](https://google.com)
-## Section 1 is [the best](https://google.com)
+## Section 1 Is [the best](https://google.com)

### Subsection Y
-### Subsection a
+### Subsection Y

### Subsection _Y_
-### Subsection _a_
+### Subsection _Y_

### Subsection \_Y
-### Subsection \_a
+### Subsection \_Y

### Subsection a: Be See
-### Subsection a: be see
+### Subsection a: Be See

### Subsection B
-### Subsection b
+### Subsection B

### Subsection C

## Section 2 Is the Test
-## section 2 is the test
+## Section 2 Is the Test

### Subsection 1
-### subsection 1
+### Subsection 1

### Subsection 2

#### `options.opt1`

#### `options.opt2`

#### Additional Option: `options.opt3`
-#### Additional option: `options.opt3`
+#### Additional Option: `options.opt3`

## Section 3 Has The Rest
-## Section 3 has the rest
+## Section 3 Has The Rest

### Subsection [a][1]

#### Sci-Fi Title Generator
-#### Sci-fi title generator
+#### Sci-Fi Title Generator

##### Children of Celeste
-##### children of celeste
+##### Children of Celeste

##### The Bionic Oblivion
-##### the bionic oblivion
+##### The Bionic Oblivion

##### Snows of Arrakis
-##### snows Of arrakis
+##### Snows of Arrakis

[1]: https://www.youtube.com/watch?v=dFs4yX4V7NQ
```
Expand Down

0 comments on commit 1311199

Please sign in to comment.