pandoc-3.1.2: Conversion between markup formats
CopyrightCopyright (C) 2013-2023 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley@edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Data

Description

Access to pandoc's data files.

Synopsis

Documentation

readDefaultDataFile :: PandocMonad m => FilePath -> m ByteString Source #

Read file from from the default data files.

defaultUserDataDir :: IO FilePath Source #

Return appropriate user data directory for platform. We use XDG_DATA_HOME (or its default value), but for backwards compatibility, we fall back to the legacy user data directory ($HOME/.pandoc on *nix) if the XDG_DATA_HOME is missing and this exists. If neither directory is present, we return the XDG data directory. If the XDG data directory is not defined (e.g. because we are in an environment where $HOME is not defined), we return the empty string.