Add useful comment.

This commit is contained in:
Parker Moore
2016-11-10 15:36:05 -08:00
parent 347651e571
commit d50ef0e3dd

View File

@@ -84,6 +84,12 @@ module Jekyll
end
end
# We include underscores in keys to allow for 'i_month' and so forth.
# This poses a problem for keys which are followed by and underscore
# but the underscore is not part of the key, e.g. '/:month_:day'.
# That should be :month and :day, but our key extraction regexp isn't
# smart enough to know that so we have to make it an explicit
# possibility.
def possible_keys(key)
if key.end_with?("_")
[key, key.chomp("_")]