diff options
author | stuebinm | 2021-12-26 03:05:58 +0100 |
---|---|---|
committer | stuebinm | 2021-12-26 03:05:58 +0100 |
commit | 4c9e6efc70b069b279e0e009e4dd836015bbf4df (patch) | |
tree | fb9aecf1d3e7d80cd0e5a2bea71f4563704ec6dc /lib/Properties.hs | |
parent | 687e2369472a220293e89307493a21940ab8e4eb (diff) |
separate blocking for separate contexts
(audio links now have their own allowlist, which won't put things
through the dereferrer)
Diffstat (limited to 'lib/Properties.hs')
-rw-r--r-- | lib/Properties.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index d0f0d57..16c8c63 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -44,7 +44,7 @@ import LintWriter (LintWriter, adjust, askContext, import Paths (PathResult (..), RelPath (..), getExtension, isOldStyle, parsePath) import Types (Dep (Link, Local, LocalMap, MapLink)) -import Uris (SubstError (..), applySubst, parseUri) +import Uris (SubstError (..), applySubsts, parseUri) @@ -699,7 +699,7 @@ unwrapURI :: (KnownSymbol s, HasProperties a) -> LintWriter a unwrapURI sym p@(Property name _) f g = unwrapString p $ \link -> do subst <- lintConfig configUriSchemas - case applySubst sym subst link of + case applySubsts sym subst link of Right uri -> do setProperty name uri f uri @@ -708,7 +708,9 @@ unwrapURI sym p@(Property name _) f g = unwrapString p $ \link -> do isLobby <- lintConfig configAssemblyTag <&> (== "lobby") (if isLobby then warn else complain) $ case err of - IsBlocked -> link <> " is a blocked site." + DomainIsBlocked domains -> link <> " is a blocked site; links in this \ + \context may link to " <> prettyprint domains + IsBlocked -> link <> " is blocked." DomainDoesNotExist domain -> "The domain " <> domain <> " does not exist; \ \please make sure it is spelled correctly." SchemaDoesNotExist schema -> |