You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am not mistaken, YAML has a special null literal. What if the metadata parser returned an empty field on null?
That would probably make no difference currently, but together with #913 that would allow one, for example, to set title: null to remove the title from defaultContext without having to write any context manipulation code in Haskell.
I’m not sure how useful it is, but it seems to be very easy to implement, so, I was thinking, why not? (Also, somewhat related, #348 (comment).)
The text was updated successfully, but these errors were encountered:
This requires defaultContext to become Context (Maybe String): empty would signal lack of value while Nothing signals that the value is "null". I can't tell offhand how big of an impact this will have on other modules and interfaces; e.g. Hakyll.Core.Metadata.lookupString uses Nothing to indicate "value not found", so I wonder how many other public interfaces are don't distinguish between the absence of value and "null".
So I kind of ambivalent about the idea, and fearful that implementing it will bring more problems than it resolves. If you feel strongly about it, please make a draft PR to demonstrate that it's not as bad as I imagine :)
If I am not mistaken, YAML has a special
null
literal. What if the metadata parser returned an empty field onnull
?That would probably make no difference currently, but together with #913 that would allow one, for example, to set
title: null
to remove the title fromdefaultContext
without having to write any context manipulation code in Haskell.I’m not sure how useful it is, but it seems to be very easy to implement, so, I was thinking, why not? (Also, somewhat related, #348 (comment).)
The text was updated successfully, but these errors were encountered: