diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Core/Identifier/Pattern.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Identifier/Pattern.hs b/src/Hakyll/Core/Identifier/Pattern.hs index 8fbc6f8..3a07219 100644 --- a/src/Hakyll/Core/Identifier/Pattern.hs +++ b/src/Hakyll/Core/Identifier/Pattern.hs @@ -43,6 +43,7 @@ module Hakyll.Core.Identifier.Pattern , (.||.) , complement , withVersion + , noVersion , fromLiteral -- * Applying patterns @@ -228,6 +229,12 @@ withVersion p v = optimize $ And p $ fromVersion $ Just v -------------------------------------------------------------------------------- +-- | Match only if the identifier has no version set +noVersion :: Pattern -> Pattern +noVersion p = optimize $ And p $ fromVersion Nothing + + +-------------------------------------------------------------------------------- -- | Check if a pattern is a literal. @\"*.markdown\"@ is not a literal but -- @\"posts.markdown\"@ is. fromLiteral :: Pattern -> Maybe Identifier |