First pass serializing image thumbs.

Authored by ssastry.


First pass serializing image thumbs.

  • Collect all figure tokens and process them as a chunk
  • This effectively mimics context-sensitive DOM walking, but since we need serialization supported on a token stream, we cannot use real DOM walking. The current technique should also work on a token stream.
  • There is a FIXME about the image filename being capitalized. This needs fixing in the parser or some other way of recognizing original unnormalized filenam.

Amended by gwicke:

  • Build option list and join it with pipe to avoid stray trailing pipe
  • Satisfy JSHint's weird preference to have '&&' and '||' at the end of the line

Change-Id: I1e5f6600f297fcdf81e3227a82ca3b71d4e97fc3