Skip to content

Mc-Zen/prism-typst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism-Typst

Syntax-highlighting Typst code with Prism

Node.js CI

A demo, which also explains some things, can be found here.

Contents

The src/ directory contains a Prism language definition for typst which you can import after importing Prism, e.g.,

<script src="prism.js"></script>
<script src="prism-typst.js"></script>

as well as a CSS stylesheet that imitates the color scheme of the Typst web app.

For use with a program using node.js (e.g., with Docusaurus), a light theme as well as a dark theme are available with the file src/typst-theme.js.

Contribution needed

In order to maintain and improve this language definition for Prism, I'm looking for help with

  • writing tests (important since regex matching so many things is a little brittle) and
  • treating/fixing more edge cases (and improvements in general).

About

Syntax-highlighting Typst code with Prism

Topics

Resources

License

Stars

Watchers

Forks

Contributors