@lwrjs/markdown-view-provider 0.8.0-alpha.8 → 0.8.0

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.
@@ -27,11 +27,14 @@ __export(exports, {
27
27
  htmlMetadataCollector: () => htmlMetadataCollector
28
28
  });
29
29
  var import_unist_util_visit = __toModule(require("unist-util-visit"));
30
+ var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
30
31
  function imageVisitor(collector, node) {
31
32
  if (node.tagName === "img") {
33
+ const url = node.properties.src;
32
34
  collector.images.push({
33
- url: node.properties.src,
35
+ url,
34
36
  tagName: "img",
37
+ relative: (0, import_shared_utils.isRelative)(url),
35
38
  location: {
36
39
  startOffset: node.position?.start.offset || -1,
37
40
  endOffset: node.position?.end.offset || -1
@@ -1,9 +1,12 @@
1
1
  import visit from 'unist-util-visit';
2
+ import { isRelative } from '@lwrjs/shared-utils';
2
3
  function imageVisitor(collector, node) {
3
4
  if (node.tagName === 'img') {
5
+ const url = node.properties.src;
4
6
  collector.images.push({
5
- url: node.properties.src,
7
+ url,
6
8
  tagName: 'img',
9
+ relative: isRelative(url),
7
10
  location: {
8
11
  startOffset: node.position?.start.offset || -1,
9
12
  endOffset: node.position?.end.offset || -1,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.8.0-alpha.8",
7
+ "version": "0.8.0",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,8 +30,8 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/base-template-engine": "0.8.0-alpha.8",
34
- "@lwrjs/shared-utils": "0.8.0-alpha.8",
33
+ "@lwrjs/base-template-engine": "0.8.0",
34
+ "@lwrjs/shared-utils": "0.8.0",
35
35
  "gray-matter": "^4.0.2",
36
36
  "hast-util-has-property": "^1.0.4",
37
37
  "hast-util-heading-rank": "^1.0.1",
@@ -47,10 +47,10 @@
47
47
  "vfile": "^4.2.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@lwrjs/types": "0.8.0-alpha.8"
50
+ "@lwrjs/types": "0.8.0"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=14.15.4 <19"
54
54
  },
55
- "gitHead": "345e7545d2d1d1f587567aacf0a072473c746d9e"
55
+ "gitHead": "6db460e470fb149ca282aaa293ad4f0be03ae4e8"
56
56
  }