diff --git a/packages/mdast-util-to-bemjson/lib/handlers/image.js b/packages/mdast-util-to-bemjson/lib/handlers/image.js index 60fca08..553df11 100644 --- a/packages/mdast-util-to-bemjson/lib/handlers/image.js +++ b/packages/mdast-util-to-bemjson/lib/handlers/image.js @@ -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); diff --git a/packages/mdast-util-to-bemjson/lib/handlers/link.js b/packages/mdast-util-to-bemjson/lib/handlers/link.js index 68fed3a..22a64c0 100644 --- a/packages/mdast-util-to-bemjson/lib/handlers/link.js +++ b/packages/mdast-util-to-bemjson/lib/handlers/link.js @@ -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); diff --git a/packages/mdast-util-to-bemjson/package.json b/packages/mdast-util-to-bemjson/package.json index da304d3..f9fc559 100644 --- a/packages/mdast-util-to-bemjson/package.json +++ b/packages/mdast-util-to-bemjson/package.json @@ -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" } }