Comments (2)
I converted the new pygments lexer (credits go to @jvoisin) to the Chroma XML format using python3 _tools/pygments2chroma_xml.py pygments.lexers.typst.TypstLexer > lexers/embedded/typst.xml
. See miliog@d05a092.
Only the line
<rule pattern="(_|^|+|-|/|*|->|<-|!=|==)\b"><token type="Operator"/></rule>
was broken and an error was shown while running the test. To fix it, I escaped the special characters +, -, /, and * by preceding them with a backslash (\):
<rule pattern="(_|\^|\+|\-|\/|\*|>|<|!=|==)\b"><token type="Operator"/></rule>
However, there are still a few problems remaining, as shown below:
My example works just fine in pygments
according to https://pygments.org/demo/:
from chroma.
FYI I have looked at this problem and put some incremental work into the typst lexer at https://github.com/pygments/pygments It will probably be the easiest if we first develop there and then simply copy the lexer over just as you did before. Happy for feedback on my recent PR over there:
pygments/pygments#2656
from chroma.
Related Issues (20)
- Surround whitespace (invisible characters) with tags
- Add mIRC formatter support
- Styles with no text color
- Add support for Lean
- `lexer.Match` does not work as intended HOT 5
- LineHighlight style is incorrect HOT 5
- Support Vector Remap Language
- Docker lexer does not work properly for HEALTHCHECK statements
- SVG Formatter Line Numbers
- Check fails while building with latest Go package on Fedora 39 HOT 1
- How to lex heredocs (Caddyfile) HOT 4
- Failed tests: github.com/alecthomas/repr/repr.go:83:10: syntax error: unexpected [, expecting ( HOT 1
- Source filenames from linguist `language.yml` HOT 4
- TypeScript Lexer: JSX Node properties with dashes flagged as syntax errors HOT 1
- TypeScript Lexer: JSX Nodes with a comment flagged as syntax errors
- Please can we have a new release? HOT 3
- LRU compiled style cache for the HTML formatter appears to break hugo HOT 6
- Please add Starlark (Bazel) lexer HOT 2
- C lexer treats #define as a comment
- Add support for RenPy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chroma.