greghendershott / frog

Frog is a static blog generator implemented in Racket, targeting Bootstrap and able to use Pygments.
918 stars 96 forks source link

suppress warning for empty Tags: #212

Closed jbclements closed 6 years ago

jbclements commented 6 years ago

This PR widens the regexp used to match metadata fields to allow an empty string to the right of the colon (that is, + turns into *). This suppresses the warning that's currently associated with using "Tags: ". Reading the further-down code suggests that the later hash mapping from tags to '("") is treated the same as not having a mapping at all.

My only question about this change is what exactly it means to have a title or date which is whitespace-only. IIUC the current code prevents "Title:" but allows "Title: ". Following this PR, both appear to be allowed. I think that probably these should both be disallowed. So maybe there's another piece of code to add here, but I didn't want to do that without consulting.