From deedc961c541370b1776657956d0c9069b662e2d Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sun, 30 Jun 2019 14:38:23 +0000 Subject: [PATCH] If highlight backend not set for pretty JSON, assume Skylighting Highlighter2 doesn't work for JSON anyway (not sure why yet). --- src/Yesod/ActivityPub.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yesod/ActivityPub.hs b/src/Yesod/ActivityPub.hs index 928775f..da2658d 100644 --- a/src/Yesod/ActivityPub.hs +++ b/src/Yesod/ActivityPub.hs @@ -190,7 +190,7 @@ provideHtmlAndAP' host object widget = selectRep $ do Just "true" -> do mhl <- lookupGetParam "highlight" let sky = case mhl of - Nothing -> error "Highlight style not set" + Nothing -> True Just "hl2" -> False Just "sky" -> True Just _ -> error "Invalid highlight style" @@ -223,7 +223,7 @@ provideHtmlAndAP'' body widget = selectRep $ do Just "true" -> do mhl <- lookupGetParam "highlight" let sky = case mhl of - Nothing -> error "Highlight style not set" + Nothing -> True Just "hl2" -> False Just "sky" -> True Just _ -> error "Invalid highlight style"