diff --git a/src/Yesod/ActivityPub.hs b/src/Yesod/ActivityPub.hs index dac8d08..9f2f270 100644 --- a/src/Yesod/ActivityPub.hs +++ b/src/Yesod/ActivityPub.hs @@ -187,16 +187,27 @@ provideHtmlAndAP' host object widget = selectRep $ do mval <- lookupGetParam "prettyjson" defaultLayout $ case mval of - Just "true" -> renderPrettyJSON doc + Just "true" -> do + mhl <- lookupGetParam "highlight" + let sky = case mhl of + Nothing -> error "Highlight style not set" + Just "hl2" -> False + Just "sky" -> True + Just _ -> error "Invalid highlight style" + if sky + then renderPrettyJSONSkylighting doc + else renderPrettyJSON doc _ -> do widget mroute <- getCurrentRoute for_ mroute $ \ route -> do params <- reqGetParams <$> getRequest let pj = ("prettyjson", "true") + hl = ("highlight", "hl2") + params' = pj : hl : params [whamlet|