Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(npm): Remove normalize-uri package from mdast-util-to-bemjson #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/mdast-util-to-bemjson/lib/handlers/image.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
'use strict';

const normalize = require('normalize-uri');

const parseBlock = require('../build-node').parse;

function image(transform, node) {
const block = parseBlock(node.type);

const props = { src: normalize(node.url) };
const props = { src: encodeURI(decodeURI(node.url)) };
node.title && (props.title = node.title);
node.alt && (props.alt = node.alt);

Expand Down
4 changes: 1 addition & 3 deletions packages/mdast-util-to-bemjson/lib/handlers/link.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
'use strict';

const normalize = require('normalize-uri');

const parseBlock = require('../build-node').parse;

function link(transform, node) {
const block = parseBlock(node.type);

const props = { href: normalize(node.url) };
const props = { href: encodeURI(decodeURI(node.url)) };
node.title && (props.title = node.title);

return transform(node, block, props, node.value);
Expand Down
3 changes: 1 addition & 2 deletions packages/mdast-util-to-bemjson/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"lodash.clonedeep": "^4.5.0",
"lodash.defaultsdeep": "^4.6.0",
"lodash.omit": "^4.5.0",
"mdast-util-definitions": "^1.2.2",
"normalize-uri": "^1.1.0"
"mdast-util-definitions": "^1.2.2"
}
}