@seafile/sdoc-editor 1.0.206-test0.4.5 → 1.0.206-test0.4.6

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.
@@ -66,8 +66,9 @@ const parseVideoLink = url => {
66
66
 
67
67
  // Tencent url conversion
68
68
  if (url.includes('v.qq.com')) {
69
- const vidMatch = url.match(/\/([^\/]+)\.html$/);
69
+ const vidMatch = url.match(/\/([^\/]+)\.html/);
70
70
  const videoUrl = vidMatch !== null && vidMatch !== void 0 && vidMatch[1] ? `https://v.qq.com/txp/iframe/player.html?vid=${vidMatch[1]}` : false;
71
+ console.log(videoUrl);
71
72
  return videoUrl;
72
73
  }
73
74
 
@@ -100,14 +101,12 @@ const insertVideo = function (editor, videoFiles, srcList, selection) {
100
101
  size: videoFiles[0].size || null,
101
102
  isEmbeddableLink: videoFiles[0].isEmbeddableLink || false
102
103
  };
103
- console.log(videoInfo);
104
104
  let videoNodes;
105
105
  // Return when embedding an invalid youtube, tencent or bilibili video url
106
106
  if (videoInfo.isEmbeddableLink) {
107
107
  const parsedSrc = parseVideoLink(srcList[0]);
108
108
  if (!parsedSrc) return;
109
109
  videoNodes = generateVideoNode(parsedSrc, videoInfo);
110
- console.log(videoNodes);
111
110
  } else {
112
111
  videoNodes = generateVideoNode(srcList[0], videoInfo);
113
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.206-test0.4.5",
3
+ "version": "1.0.206-test0.4.6",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",