Skip to main content

A JSX lexer for Pygments

Project description

A JSX lexer for Pygments

Installation

$ pip install jsx-lexer

Usage

To use within Sphinx, simply specify ‘jsx’ for your code-block:

.. code-block:: jsx

    const BlogTitle = ({ children }) => (
      <h3>{children}</h3>
    );
    // class component
    class BlogPost extends React.Component {
      renderTitle(title) {
        return <BlogTitle>{title}</BlogTitle>
      };
      render() {
        return (
        <div className="blog-body">
          {this.renderTitle(this.props.title)}
          <p>{this.props.body}</p>
        </div>
        );
      }
    }

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

jsx-lexer-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

jsx_lexer-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file jsx-lexer-0.0.1.tar.gz.

File metadata

  • Download URL: jsx-lexer-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jsx-lexer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5ef4b11aec5298a642bb00a8e4d0e8de7ec9e0b5270ccbb3c49dbe4e551120b6
MD5 b946ee16b08466815a88c40b680eab53
BLAKE2b-256 9129a022816d51d7f896245ded930157ec0824cb5df3a3855d81e9cb6ff6f075

See more details on using hashes here.

Provenance

File details

Details for the file jsx_lexer-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jsx_lexer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64d3ddd871ad9a696ae3491995ab5745a6030d4a87223acf4eec27d351f25e3d
MD5 ac176f4fc9a11303231fdaef7e6c44d5
BLAKE2b-256 e9c53786d011df1b86962fbf1dab5974de79564364c6972716419545e5c0b60e

See more details on using hashes here.

Provenance

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