docs: explain `recognizeSelfClosing` for raw-text and RCDATA elements

Merged
FB
7h ago
+1-1

With recognizeSelfClosing: true in HTML mode, /> also closes raw-text and RCDATA elements such as iframe, script and textarea at once, so the text in <textarea/>hello follows the element. Browsers parsing HTML ignore the slash there and put hello inside the textarea.

The recognizeSelfClosing row of the README's parser options table now says so. Documentation only; no code change.

🤖 Generated with Claude Code, using Opus 5.5.

Summary by CodeRabbit

  • Documentation
    • Clarified the documented behavior of recognizeSelfClosing in HTML mode: /> closes raw-text and RCDATA elements, unlike in browsers. The documented default setting and behavior in XML mode remain unchanged. This update makes the distinction between the parser’s HTML behavior and browser behavior clearer in the README.