Skip to content

Commit 5e5d0a8

Browse files
committed
Upgrade urltools to 0.4.2. Fixes #169
1 parent 58e4a95 commit 5e5d0a8

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"hreftypes": "^1.0.1",
4444
"pretty-bytes": "^5.2.0",
4545
"request": "^2.88.0",
46-
"urltools": "^0.4.1",
46+
"urltools": "^0.4.2",
4747
"yargs": "^16.0.3"
4848
},
4949
"devDependencies": {

test/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3004,4 +3004,26 @@ describe('hyperlink', function () {
30043004
todo: 0,
30053005
});
30063006
});
3007+
3008+
it('should handle special characters in paths. Regression test https://github.com/Munter/hyperlink/issues/169', async () => {
3009+
const t = new TapRender();
3010+
// t.pipe(process.stdout);
3011+
sinon.spy(t, 'push');
3012+
await hyperlink(
3013+
{
3014+
recursive: false,
3015+
root: pathModule.resolve(__dirname, '..', 'testdata', '@scopename'),
3016+
inputUrls: ['index.html'],
3017+
},
3018+
t
3019+
);
3020+
3021+
expect(t.close(), 'to satisfy', {
3022+
count: 2,
3023+
pass: 2,
3024+
fail: 0,
3025+
skip: 0,
3026+
todo: 0,
3027+
});
3028+
});
30073029
});

testdata/@scopename/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="page.html">page link</a>

testdata/@scopename/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="/">index</a>

0 commit comments

Comments
 (0)