The first commit fixes a bug in the HTML text -- the last character output by discount is replaced with a '\0' character. It seems that the buffer is already NULL-terminated, so the NULL is not required.
The second commit changes the text that is passed to QuickLook to be a complete HTML page. Technically the newlines are not required, but it does aid readability when the preview is dumped to file for inspection.
The first commit fixes a bug in the HTML text -- the last character output by
discount
is replaced with a '\0' character. It seems that the buffer is already NULL-terminated, so the NULL is not required.The second commit changes the text that is passed to QuickLook to be a complete HTML page. Technically the newlines are not required, but it does aid readability when the preview is dumped to file for inspection.