nodebb-plugin-link-preview 2.2.0 → 2.2.1
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.
- package/library.js +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
package/library.js
CHANGED
|
@@ -116,7 +116,7 @@ async function process(content, { type, pid, tid, attachments }) {
|
|
|
116
116
|
const urlMatch = match[0].match(/href=["'](.*?)["']/);
|
|
117
117
|
let url = urlMatch ? decodeURI(urlMatch[1]) : '';
|
|
118
118
|
const text = match[0].replace(/<[^>]+>/g, ''); // Strip tags to get text
|
|
119
|
-
if (url
|
|
119
|
+
if (url !== text) {
|
|
120
120
|
match = anchorRegex.exec(content);
|
|
121
121
|
continue;
|
|
122
122
|
}
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-link-preview",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "nodebb-plugin-link-preview",
|
|
9
|
-
"version": "2.2.
|
|
9
|
+
"version": "2.2.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"cheerio": "^1.0.0-rc.12",
|