diff options
author | Yann Herklotz <git@yannherklotz.com> | 2023-05-28 01:57:20 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2023-05-28 01:57:20 +0100 |
commit | 2783a33b0d4a9436343c88e1ed90fae03b8fb4bb (patch) | |
tree | 986a7287ac0f19d1a95cfa02e77415d7068324d9 /src/Zettel/Parse.hs | |
parent | fcee1c0c8c9c8ddce45f26c566b5eb8527e9dd0b (diff) | |
download | zk-visual-2783a33b0d4a9436343c88e1ed90fae03b8fb4bb.tar.gz zk-visual-2783a33b0d4a9436343c88e1ed90fae03b8fb4bb.zip |
Format all files using ormolu
Diffstat (limited to 'src/Zettel/Parse.hs')
-rw-r--r-- | src/Zettel/Parse.hs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Zettel/Parse.hs b/src/Zettel/Parse.hs index 3fbb37b..bb08291 100644 --- a/src/Zettel/Parse.hs +++ b/src/Zettel/Parse.hs @@ -3,6 +3,7 @@ module Zettel.Parse where import Data.Default (def) import qualified Data.Map.Strict as Map import qualified Data.Text as T +import System.FilePath (takeBaseName) import Text.Pandoc.Builder (toMetaValue) import Text.Pandoc.Chunks (Chunk (..), ChunkedDoc (..), splitIntoChunks) import Text.Pandoc.Class (runIOorExplode) @@ -11,7 +12,6 @@ import Text.Pandoc.Options (ReaderOptions (..), getDefaultExtensions) import Text.Pandoc.Readers (readOrg) import Text.Pandoc.Shared (stringify) import Text.Pandoc.Walk (query, walk) -import System.FilePath (takeBaseName) import Zettel.Common import Zettel.Types @@ -103,9 +103,14 @@ pandocFromChunk (_, t, c) = . walk removeDiv . walk removeHeadings . Pandoc - (Meta (fromList (("categories", toMetaValue [t]) - : ("zettelid", MetaString (chunkId c)) - : headingMeta))) + ( Meta + ( fromList + ( ("categories", toMetaValue [t]) + : ("zettelid", MetaString (chunkId c)) + : headingMeta + ) + ) + ) $ chunkContents c where headingMeta = queryHeaderMetaData $ chunkContents c @@ -155,4 +160,4 @@ parseZettelKasten fl = do let pandocList = map (updatePandocAttr . pandocFromChunk) chunks return . refreshPandocMeta $ ZettelGraph (fromList $ map zettelFromPandoc pandocList) Nothing ---parseBibliography :: FilePath -> IO [Pandoc] +-- parseBibliography :: FilePath -> IO [Pandoc] |