Skip to content

Commit

Permalink
Make standard module available under std (typst 0.12).
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Oct 22, 2024
1 parent 1703100 commit c5a5c19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Typst/Evaluate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ initialEvalState :: EvalState m
initialEvalState =
emptyEvalState { evalIdentifiers = [(BlockScope, mempty)]
, evalMathIdentifiers = [(BlockScope, mathModule <> symModule)]
, evalStandardIdentifiers = [(BlockScope, standardModule')]
, evalStandardIdentifiers = [(BlockScope, standardModule'')]
}
where
standardModule' = M.insert "eval" evalFunction standardModule
standardModule'' = M.insert "std" (VModule "std" standardModule') standardModule'
evalFunction = makeFunction $ do
code :: Text <- nthArg 1
case parseTypst "eval" ("#{\n" <> code <> "\n}") of
Expand Down

0 comments on commit c5a5c19

Please sign in to comment.