From 4c9e6efc70b069b279e0e009e4dd836015bbf4df Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 26 Dec 2021 03:05:58 +0100 Subject: separate blocking for separate contexts (audio links now have their own allowlist, which won't put things through the dereferrer) --- lib/Properties.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Properties.hs') 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 -> -- cgit v1.2.3