Javascript: Swallow quote when committing semicolon

Includes test case