fix the lexing of definitions of images and figures
ref: http://html5sec.org/#46