Skip to content

Commit

Permalink
fix: getWebmentionContent filter
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburnell committed Jan 19, 2024
1 parent b3c3714 commit 993300d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
## Breaking change for v2.0.0

Version 2.0.0 introduces a breaking change for those migrating from earlier versions of the plugin. This affects usage of the plugin from JavaScript files; specifically, you will need to make a small change to the way that you require() the plugin by removing an extra set of parentheses:
Version 2.0.0 introduces a breaking change for those migrating from earlier versions of the plugin. This affects usage of the plugin from JavaScript files; specifically, you will need to make a small change to the way that you `require()` the plugin by removing an extra set of parentheses:

**v1.2.5 and below**

```javascript
require("@chrisburnell/eleventy-cache-webmentions")()
```

**v2.0.0**
**v2.0.0 and above**

```javascript
require("@chrisburnell/eleventy-cache-webmentions")
Expand Down
2 changes: 1 addition & 1 deletion eleventy-cache-webmentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const getPublished = (webmention) => {
}

const getContent = (webmention) => {
return webmention?.["content"]?.["html"] || webmention?.["content"] || webmention?.["data"]?.["content"] || ""
return webmention?.["contentSanitized"] || webmention?.["content"]?.["html"] || webmention?.["content"]?.["value"] || webmention?.["content"] || webmention?.["data"]?.["content"] || ""
}

const getSource = (webmention) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chrisburnell/eleventy-cache-webmentions",
"version": "2.0.0",
"version": "2.0.1",
"description": "Cache webmentions using eleventy-fetch and make them available to use in collections, layouts, pages, etc. in Eleventy.",
"author": "Chris Burnell <me@chrisburnell.com>",
"license": "MIT",
Expand Down

0 comments on commit 993300d

Please sign in to comment.