Skip to content

Commit 5d32eb9

Browse files
committed
Fix some whitespace in phrasing content
Closes GH-60.
1 parent 932b1bd commit 5d32eb9

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ function toMdast(tree, options) {
2828

2929
visit(tree, onvisit)
3030

31-
return one(h, minify({newlines: settings.newlines === true})(tree), null)
31+
minify({newlines: settings.newlines === true})(tree)
32+
33+
return one(h, tree, null)
3234

3335
function h(node, type, props, children) {
3436
var result

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"hast-util-to-text": "^2.0.0",
3838
"mdast-util-phrasing": "^2.0.0",
3939
"mdast-util-to-string": "^1.0.0",
40-
"rehype-minify-whitespace": "^3.0.0",
40+
"rehype-minify-whitespace": "^4.0.3",
4141
"repeat-string": "^1.6.1",
4242
"trim-trailing-lines": "^1.1.0",
4343
"unist-util-visit": "^2.0.0",

test/fixtures/form/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Course: Lecture 01: Powers of Ten (8.01.1)
8282

8383
▶ Play
8484

85-
\+ =·
85+
\+ =
8686

8787
Comment:·
8888

test/fixtures/listing/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ hotel(); india
2424
```
2525

2626
```
27-
juliett
27+
juliett·
2828
kilo();
29-
lima
29+
lima
3030
```

test/fixtures/ruby-rt-rp-rbc-rtc-rb/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The `<ruby>`, `<rt>`, and `<rp>` elements:
44

55
The legacy `<rbc>`, `<rtc>` and `<rb>` elements:
66

7-
10312002MonthDayYearExpiration Date
7+
10312002 MonthDayYear Expiration Date

test/fixtures/straddling/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome! [This is home of...](about.html)
1818

1919
# [The Falcons!](about.html)
2020

21-
[The Lockheed Martin multirole jet fighter aircraft!](about.html) This page discusses the F-16 Fighting Falcon’s innermost secrets.
21+
[The Lockheed Martin multirole jet fighter aircraft! ](about.html)This page discusses the F-16 Fighting Falcon’s innermost secrets.
2222

2323
## Even harder implicit paragraphs
2424

@@ -41,7 +41,7 @@ You can play with my cat simulator. To see the cat simulator, use one of the fol
4141
- [Download simulator file](cats.sim)
4242
- [Use online simulator](https://sims.example.com/watch?v=LYds5xY4INU)
4343

44-
Alternatively, upgrade to the Mellblom Browser. I’m quite proud of it.
44+
Alternatively, upgrade to the Mellblom Browser. I’m quite proud of it.
4545

4646
## Overlap explicit
4747

test/fixtures/table-headless/index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ With align:
2121

2222
Here’s a Sudoku:
2323

24-
| | | | | | | | | |
25-
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
26-
| 1 | | 3 | 6 | | 4 | 7 | | 9 |
27-
| | 2 | | | 9 | | | 1 | |
28-
| 7 | | | | | | | | 6 |
29-
| 2 | | 4 | | 3 | | 9 | | 8 |
30-
| | | | | | | | | |
31-
| 5 | | | 9 | | 7 | | | 1 |
32-
| 6 | | | | 5 | | | | 2 |
33-
| | | | | 7 | | | | |
34-
| 9 | | | 8 | | 2 | | | 5 |
24+
| | | | | | | | | |
25+
| - | - | - | - | - | - | - | - | - |
26+
| 1 | | 3 | 6 | | 4 | 7 | | 9 |
27+
| | 2 | | | 9 | | | 1 | |
28+
| 7 | | | | | | | | 6 |
29+
| 2 | | 4 | | 3 | | 9 | | 8 |
30+
| | | | | | | | | |
31+
| 5 | | | 9 | | 7 | | | 1 |
32+
| 6 | | | | 5 | | | | 2 |
33+
| | | | | 7 | | | | |
34+
| 9 | | | 8 | | 2 | | | 5 |
3535

3636
Here’s a table with a `thead` with _two_ rows:
3737

0 commit comments

Comments
 (0)