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. Pull requests are requested, and the code is released under the MIT License. We make no warranties this thing works, just doing our best.

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.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pygments_tsx-1.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygments_tsx-1.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pygments_tsx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 27eb4a2c98e114c0623bc71e3b28dd2d12834342612a87f16b338c5196475ee6
MD5 737491d4797b3b6db0d970a22b6c2bd4
BLAKE2b-256 95e267226c3fd77ca271bcddb6f3e0923073bc95c62d0c60781a94c08d2aa377

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pygments_tsx-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8a8e075ef3c0e48563ecaa07cfa7027e158d7977426a0b01e3ca283d3e6123
MD5 2a06b2696067733320f8b4dac6912468
BLAKE2b-256 cdf87463f449f9770d7970417f10deeacbfd54a729a1fca334ce7b416aff0a89

See more details on using hashes here.

Supported by

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