# DTX file generates empty file

I recently gave the documentation of my chscite package a facelift for inclusion in CTAN, and was assuming that doing so wouldn't break anything. Unfortunately, I just discovered that the package doesn't work because the .bst file isn't being generated properly, and I can't for the life of me figure out why. I know that this changeset breaks it, but I can't figure out why. The full DTX file is available on CTAN. What could be wrong?

-

I had a look on it and found that the .bib file is created if the \endinput is removed from line 659. Note that docstrip adds it anyway by default and it is not really required.
This happened because docstrip explicitly looks for \endinput lines. If you indent it with a space it works as well. I would simply remove it from the DTX file.