Improve auto-paragraph to preserve newlines and handle edge-cases better.
commit617f70a8ac3562b1613d73895dc1a29ae3bdb1f6
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 10 Aug 2008 04:32:29 +0000 (10 00:32 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 10 Aug 2008 04:32:29 +0000 (10 00:32 -0400)
tree3375a5eb989f6798374e6698d3b487717bfa99ce
parent0423985b45c1d96e718cc56641c81709d14808ac
Improve auto-paragraph to preserve newlines and handle edge-cases better.

This is a very large commit that includes numerous improvements to the
AutoParagraph injector.  These are:

* Rewritten flow control of the injector to use almost exclusively
  binary conditionals.
* Improved inline documentation with "State" comments, which give concise
  examples of what the token stack looks like at flow points.
* Documentation for all flow branches, even those with no actions.
* Factoring out of common operations to improve readability, especially the
  new iterator private methods.
* Expanded test-suite which covers new flow points, and corrects some errors
  in previous cases.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
NEWS
TODO
library/HTMLPurifier/Injector/AutoParagraph.php
tests/HTMLPurifier/ComplexHarness.php
tests/HTMLPurifier/Injector/AutoParagraphTest.php
tests/HTMLPurifier/Strategy/MakeWellFormed_InjectorTest.php