Commit c50e0870 authored by Marc Latoschik's avatar Marc Latoschik
Browse files

Merge branch 'resource-pack-transition-wue' of...

Merge branch 'resource-pack-transition-wue' of gitlab2.informatik.uni-wuerzburg.de:decker/decker into resource-pack-transition-wue
parents 268a0db2 e8bd8dcd
......@@ -5,7 +5,7 @@ import Control.Monad
import Data.Aeson
import Data.Aeson.Lens
import Development.Shake
import Development.Shake (doesFileExist)
-- import Development.Shake (doesFileExist)
import Development.Shake.FilePath
import Relude (ConvertUtf8 (encodeUtf8))
import System.Directory
......@@ -16,7 +16,6 @@ import Text.Decker.Internal.Common
import Text.Decker.Internal.Helper (replaceSuffix)
import Text.Decker.Project.Project
import Text.Decker.Server.Video (concatVideoMp4, existingVideos, slow)
import qualified GHC.IO.Device as System
-- | Rules for transcoding videos. Mp4 videos are recreated with higher
-- compression parameters if any of the recording fragments changed. Also, if
......
......@@ -43,7 +43,6 @@ import qualified Data.Text as Text
import qualified Data.Vector as Vec
import qualified Data.Yaml as Y
import Relude
import Text.Decker.Internal.Common
import Text.Decker.Internal.Exception
import Text.Pandoc hiding (lookupMeta)
import Text.Pandoc.Builder hiding (fromList, lookupMeta, toList)
......@@ -97,13 +96,13 @@ toPandocMeta' (Y.Number scientific) = MetaString $ Text.pack $ show scientific
toPandocMeta' (Y.Bool bool) = MetaBool bool
toPandocMeta' Y.Null = MetaList []
compileText :: Text -> MetaValue
compileText text =
case runPure $ readMarkdown pandocReaderOpts text of
Right pandoc@(Pandoc _ [Plain inlines]) -> MetaInlines inlines
Right pandoc@(Pandoc _ [Para inlines]) -> MetaInlines inlines
Right pandoc@(Pandoc _ blocks) -> MetaBlocks blocks
Left _ -> MetaString text
-- compileText :: Text -> MetaValue
-- compileText text =
-- case runPure $ readMarkdown pandocReaderOpts text of
-- Right pandoc@(Pandoc _ [Plain inlines]) -> MetaInlines inlines
-- Right pandoc@(Pandoc _ [Para inlines]) -> MetaInlines inlines
-- Right pandoc@(Pandoc _ blocks) -> MetaBlocks blocks
-- Left _ -> MetaString text
fromPandocMeta :: Meta -> A.Value
fromPandocMeta (Meta map) = fromPandocMeta' (MetaMap map)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment