packages feed

typst 0.8.0.1 → 0.8.0.2

raw patch · 4 files changed

+11/−5 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for typst-hs +## 0.8.0.2++  * Give correct source positions even with nested includes (#74).+ ## 0.8.0.1    * Fix subtracting units, e.g. `1mm-0mm` (#71, Luke Grehan).
src/Typst/Evaluate.hs view
@@ -34,7 +34,7 @@ import Typst.Bind (destructuringBind) import Typst.Constructors (getConstructor) import Typst.Methods (getMethod)-import Typst.Module.Standard (loadFileText, standardModule, symModule)+import Typst.Module.Standard (loadFileText, standardModule, symModule, getPath) import Typst.Module.Math (mathModule) import Typst.MathClass (mathClassOf, MathClass(Relation)) import Typst.Parse (parseTypst)@@ -1024,7 +1024,8 @@                     Identifier (T.pack $ takeBaseName fp),                     Nothing,                     txt )-  case parseTypst fp txt of+  fp' <- getPath fp  -- get full path for element positions+  case parseTypst fp' txt of     Left err -> fail $ show err     Right ms -> do       operations <- evalOperations <$> getState
src/Typst/Module/Standard.hs view
@@ -9,6 +9,7 @@     symModule,     sysModule,     loadFileText,+    getPath,     applyPureFunction   ) where@@ -41,7 +42,7 @@ import Typst.Symbols (typstSymbols) import Typst.Types import Typst.Util-import System.FilePath ((</>))+import System.FilePath.Posix ((</>), normalise) import Data.Time (UTCTime(..)) import Data.Time.Calendar (fromGregorianValid) import Data.Time.Clock (secondsToDiffTime)@@ -492,7 +493,7 @@ getPath fp = do   pkgroot <- evalPackageRoot <$> getState   localdir <- evalLocalDir <$> getState-  pure $ pkgroot </> localdir </> fp+  pure $ normalise $ pkgroot </> localdir </> fp  getUTCTime :: Monad m => MP m UTCTime getUTCTime = getState >>= lift . currentUTCTime . evalOperations
typst.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               typst-version:            0.8.0.1+version:            0.8.0.2 synopsis:           Parsing and evaluating typst syntax. description:        A library for parsing and evaluating typst syntax.                     Typst (<https://typst.app>) is a document layout and