diff --git a/src/Settings.hs b/src/Settings.hs index 7e4aecb..baa97e7 100644 --- a/src/Settings.hs +++ b/src/Settings.hs @@ -19,8 +19,9 @@ import Data.Yaml (decodeEither') import Database.Persist.MySQL (MySQLConf (..)) import Language.Haskell.TH.Syntax (Exp, Name, Q) import Network.Wai.Handler.Warp (HostPreference) +import Text.Hamlet (HamletSettings(hamletNewlines), NewlineStyle(AlwaysNewlines), defaultHamletSettings) import Yesod.Default.Config2 (applyEnvValue, configSettingsYml) -import Yesod.Default.Util (WidgetFileSettings, widgetFileNoReload, +import Yesod.Default.Util (WidgetFileSettings(wfsHamletSettings), widgetFileNoReload, widgetFileReload) import qualified Database.MySQL.Base as MySQL @@ -112,7 +113,7 @@ instance FromJSON AppSettings where -- -- https://github.com/yesodweb/yesod/wiki/Overriding-widgetFile widgetFileSettings :: WidgetFileSettings -widgetFileSettings = def +widgetFileSettings = def { wfsHamletSettings = defaultHamletSettings { hamletNewlines = AlwaysNewlines } } -- | How static files should be combined. combineSettings :: CombineSettings diff --git a/templates/default-layout-wrapper.hamlet b/templates/default-layout-wrapper.hamlet index 1737670..23975d9 100644 --- a/templates/default-layout-wrapper.hamlet +++ b/templates/default-layout-wrapper.hamlet @@ -1,5 +1,4 @@ -$newline never -\ +$doctype 5 \ \ \