resolves #1065 ensure space before callout on last line of listing

This fixes the urgent issue that the space before the callout number on the last line of a listing is being dropped. There's still a larger issue with spacing in callout numbers because we are largely cutting corners to minimize processing. In the future, we're going to want to be smarter about how we align the callout numbers in the output.