diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index ab2713748..fdf62dd56 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -46,7 +46,7 @@ module Text.Pandoc.Writers.HTML ( import Control.Monad.State import Data.Char (ord, toLower) import Data.List (intersperse, isPrefixOf) -import Data.Maybe (catMaybes, fromMaybe, isJust) +import Data.Maybe (catMaybes, fromMaybe, isJust, isNothing) import Data.Monoid ((<>)) import Data.String (fromString) import Network.HTTP (urlEncode) @@ -192,6 +192,9 @@ writeHtmlString' st opts d = do case writerTemplate opts of Nothing -> return $ renderHtml body Just tpl -> do + -- warn if empty lang + when (isNothing (getField "lang" context :: Maybe String)) $ + report NoLangSpecified -- check for empty pagetitle context' <- case getField "pagetitle" context of |