Skip to content

More rigourous removal of weird whitespace at the end of paragraph #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025

Conversation

adgad
Copy link
Collaborator

@adgad adgad commented May 8, 2025

We have some hacky code to remove the weird whitespace we have at the end of lots of articles. FOr some reason that doesn't work on all articles (e.g. https://api-t.ft.com/internalcontent/bb8846e0-4506-433f-86a3-4877ad63fc32) so I've made it a bit more robust with regex whitespace checking

How to test

  • Checkout this branch locally
  • export CONTENT_API_HOST=https://api-t.ft.com
  • export CONTENT_API_READ_KEY=<api key>
  • node libraries/from-bodyxml/validate.js bb8846e0-4506-433f-86a3-4877ad63fc32

You should get no validation errors

@adgad adgad requested review from chee and a team as code owners May 8, 2025 10:53
@adgad adgad merged commit 6bda5b8 into main May 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants