Ghost/ghost/html-to-plaintext
Kevin Ansfield 48703c7f53 Added in-reply-to support to comments API
ref https://linear.app/tryghost/issue/PLG-230

- adds `in_reply_to_id` to API output
- adds `in_reply_to_snippet` to API output
  - dynamically generated from the HTML of the replied-to comment
  - excluded if the replied-to comment has been deleted or hidden
- adds `commentSnippet` to `@tryghost/html-to-plaintext`
  - skips anchor tag URLs as they won't be useful for snippet purposes
  - skips blockquotes so the snippet is more likely to contain the unique content of the replied-to comment when it's quoting a previous comment
  - returns a single line (no newline chars)
- allows setting `in_reply_to_id` when creating comments
  - id must reference a reply with the same parent
  - id must reference a published comment
- adds email notification for the original reply author when their comment is replied to
2024-11-13 12:08:04 -06:00
..
lib Added in-reply-to support to comments API 2024-11-13 12:08:04 -06:00
test Added in-reply-to support to comments API 2024-11-13 12:08:04 -06:00
.eslintrc.js Extracted html-to-plaintext shared lib into package 2022-08-03 16:51:56 +02:00
index.js Extracted html-to-plaintext shared lib into package 2022-08-03 16:51:56 +02:00
package.json Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
README.md Extracted html-to-plaintext shared lib into package 2022-08-03 16:51:56 +02:00

Html To Plaintext

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests