@chrisburnell/eleventy-cache-webmentions 1.0.0-beta.4 → 1.0.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.
@@ -169,16 +169,13 @@ const getWebmentions = async (options, url, allowedTypes = {}) => {
169
169
  .map((entry) => {
170
170
  const html = getContent(entry)
171
171
 
172
- if (html.length > options.maximumHtmlLength) {
173
- console.log(entry.data.url, "too long")
174
- entry.content = `${options.maximumHtmlText} <a href="${getSource(entry)}">${getSource(entry)}</a>`
175
- } else if (html.length && Object.keys(options.allowedHTML).length) {
176
- // console.log("sanitize")
172
+ if (html.length) {
177
173
  entry.content = sanitizeHTML(html, options.allowedHTML)
178
- } else {
179
- // console.log("default")
180
- entry.content = html
174
+ if (html.length > options.maximumHtmlLength) {
175
+ entry.content = `${options.maximumHtmlText} <a href="${getSource(entry)}">${getSource(entry)}</a>`
176
+ }
181
177
  }
178
+
182
179
  return entry
183
180
  })
184
181
  // sort by published
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrisburnell/eleventy-cache-webmentions",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0",
4
4
  "description": "Fetch and cache webmentions using eleventy-fetch.",
5
5
  "main": "eleventy-cache-webmentions.js",
6
6
  "author": "Chris Burnell <me@chrisburnell.com>",
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "@11ty/eleventy-fetch": "^3.0.0",
20
20
  "lodash": "^4.17.21",
21
- "node-fetch": "3.2.10",
21
+ "node-fetch": "2.6.5",
22
22
  "sanitize-html": "^2.7.1"
23
23
  },
24
24
  "keywords": [