[whatwg] Consuming ampersands

Philip Taylor excors+whatwg at gmail.com
Mon Dec 22 17:14:05 PST 2008

On Tue, Dec 23, 2008 at 1:08 AM, Edward Z. Yang
<edwardzyang at thewritingpot.com> wrote:
> Hello all,
> When I'm consuming a character reference, when does the ampersand get
> consumed? This doesn't seem to be obvious from the documentation, which
> talks of consuming character references and number hash signs, but never
> the ampersand.

They're consumed in the state that comes before the character
reference state, e.g.:

  " Data state
  Consume the next input character:
   -> U+0026 AMPERSAND (&) ... switch to the character reference data state."

Philip Taylor
excors at gmail.com

More information about the whatwg mailing list