Skip to main content

A plugin for adding TSX support to Pygments based off the work of the JSX plugin.

Project description

codecov

What is this?

This package includes lexers for JSX and TSX files for Pygment, as well as RSX, a language called "Toolscript" developed by retool that was syntactically close enough to add in. Pull requests are requested, and the code is released under the Creative Commons Non-Commercial License (CC BY-NC-ND 4.0).

To use

Either: pip install pygments-tsx

or add us to your requirements wherever they may be these days. (Looking at you, SetupTools, Poetry, PyPi... get it together.)

Acknowledgments

This includes Flavio Curella's awesome package JSX Lexer, and includes the ideas and some code from Igor Hatarist's stab at this same problem pygments-tsx. Flaws were introduced by StartupOS, good stuff came from them.

There's also a hack in here for forcing pygments to accept classes programatically. That was based on discussions in this thread, and specifically suggestions from Vincent Bernat and Jean Abou-Samra

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygments_tsx-1.0.4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygments_tsx-1.0.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pygments_tsx-1.0.4.tar.gz.

File metadata

  • Download URL: pygments_tsx-1.0.4.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygments_tsx-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f7213eb0df4a3f929cfec8a1f2e741446a889a2aad780d708e38bd64dbeaddf3
MD5 0dd4b544034319498549c2950d95fa48
BLAKE2b-256 11e38bc5a99ab41d0a036cf96caf2f4a43bcb7ebd838b0567830d75695b6ab6c

See more details on using hashes here.

File details

Details for the file pygments_tsx-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pygments_tsx-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygments_tsx-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 abc25be6354198950e315939c3f792b3d00bba42508a8d5a2fa2569576cc6bd5
MD5 1f50727ff4dfb4c4a736bc6feaf2cca6
BLAKE2b-256 26c5da46a02c3486baaacdeaddba563004ec30560f6cfd53baa2bc55fad59d12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page