@ndla/article-converter 6.1.5 → 6.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { attributesToProps, domToReact } from "html-react-parser";
|
|
10
|
-
import SafeLink from "@ndla/safelink";
|
|
10
|
+
import { SafeLink } from "@ndla/safelink";
|
|
11
11
|
import { getPossiblyRelativeUrl } from "@ndla/ui";
|
|
12
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
13
|
export const anchorPlugin = (node, opts, _ref) => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { attributesToProps, domToReact } from "html-react-parser";
|
|
10
|
-
import SafeLink from "@ndla/safelink";
|
|
10
|
+
import { SafeLink } from "@ndla/safelink";
|
|
11
11
|
import { getPossiblyRelativeUrl } from "@ndla/ui";
|
|
12
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
13
|
export const anchorPlugin = (node, options, _ref) => {
|
|
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.anchorPlugin = void 0;
|
|
7
7
|
var _htmlReactParser = require("html-react-parser");
|
|
8
|
-
var _safelink =
|
|
8
|
+
var _safelink = require("@ndla/safelink");
|
|
9
9
|
var _ui = require("@ndla/ui");
|
|
10
10
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
11
|
/**
|
|
13
12
|
* Copyright (c) 2023-present, NDLA.
|
|
14
13
|
*
|
|
@@ -23,7 +22,7 @@ const anchorPlugin = (node, opts, _ref) => {
|
|
|
23
22
|
} = _ref;
|
|
24
23
|
const props = (0, _htmlReactParser.attributesToProps)(node.attribs);
|
|
25
24
|
const href = (0, _ui.getPossiblyRelativeUrl)(props.href, path);
|
|
26
|
-
return (0, _jsxRuntime.jsx)(_safelink.
|
|
25
|
+
return (0, _jsxRuntime.jsx)(_safelink.SafeLink, {
|
|
27
26
|
...props,
|
|
28
27
|
to: href,
|
|
29
28
|
children: (0, _htmlReactParser.domToReact)(node.children, opts)
|
|
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.anchorPlugin = void 0;
|
|
7
7
|
var _htmlReactParser = require("html-react-parser");
|
|
8
|
-
var _safelink =
|
|
8
|
+
var _safelink = require("@ndla/safelink");
|
|
9
9
|
var _ui = require("@ndla/ui");
|
|
10
10
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
11
|
/**
|
|
13
12
|
* Copyright (c) 2023-present, NDLA.
|
|
14
13
|
*
|
|
@@ -23,7 +22,7 @@ const anchorPlugin = (node, options, _ref) => {
|
|
|
23
22
|
} = _ref;
|
|
24
23
|
const props = (0, _htmlReactParser.attributesToProps)(node.attribs);
|
|
25
24
|
const href = (0, _ui.getPossiblyRelativeUrl)(props.href, path);
|
|
26
|
-
return (0, _jsxRuntime.jsx)(_safelink.
|
|
25
|
+
return (0, _jsxRuntime.jsx)(_safelink.SafeLink, {
|
|
27
26
|
...props,
|
|
28
27
|
target: "_blank",
|
|
29
28
|
to: href,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/article-converter",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.7",
|
|
4
4
|
"description": "Transforms NDLA articles into extended html versions",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@ndla/types-embed": "^4.1.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/code": "^5.0.
|
|
35
|
-
"@ndla/ui": "^50.11.
|
|
34
|
+
"@ndla/code": "^5.0.48",
|
|
35
|
+
"@ndla/ui": "^50.11.3",
|
|
36
36
|
"html-react-parser": "^4.2.2",
|
|
37
37
|
"lodash": "^4.17.20"
|
|
38
38
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ae7b0eeb9ec17066999f7d2186bd31251b88ed4b"
|
|
52
52
|
}
|