• Devon Rifkin's avatar
    thinking: fix double emit when no opening tag · 2cb0a580
    Devon Rifkin authored
    The thinking parser will automatically transition to being a
    pass-through if non-whitespace is seen before an opening tag. However,
    we weren't clearing the buffer after the first non-whitespace input, so
    in practice the first token would be emitted twice.
    
    Added a test that demonstrated this, and then fixed the bug.
    2cb0a580
parser_test.go 6.67 KB