Skip to content

Commit e623ab2

Browse files
committed
Remove trim dependency
1 parent 90b71b8 commit e623ab2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/all.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module.exports = all
44

5-
var trim = require('trim')
65
var one = require('./one')
76

87
function all(h, parent) {
@@ -19,13 +18,13 @@ function all(h, parent) {
1918
if (result) {
2019
if (index && nodes[index - 1].type === 'break') {
2120
if (result.value) {
22-
result.value = trim.left(result.value)
21+
result.value = result.value.replace(/^\s+/, '')
2322
}
2423

2524
head = result.children && result.children[0]
2625

2726
if (head && head.value) {
28-
head.value = trim.left(head.value)
27+
head.value = head.value.replace(/^\s+/, '')
2928
}
3029
}
3130

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"detab": "^2.0.0",
2828
"mdast-util-definitions": "^1.2.0",
2929
"mdurl": "^1.0.1",
30-
"trim": "0.0.1",
3130
"trim-lines": "^1.0.0",
3231
"unist-builder": "^1.0.1",
3332
"unist-util-generated": "^1.1.0",

0 commit comments

Comments
 (0)