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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jsx-lexer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d20f8a126f362ee43b7c12ba11038d0d7adf9dd42980a4d61b592251f98c5b48
MD5 b17064d8cd3c091d9b4ef87e878e6c52
BLAKE2b-256 4edc99d51b748a5133d9aee047f3dd1baf7f52c184986f88685b4d51e22b1a21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsx_lexer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f9b472b1e13dd5ab51cc1745bf7d2d3611b6d7a46eebb9594dc6734a08289e1
MD5 ef7f5b6771525903a4b1dfdacd354f9f
BLAKE2b-256 a93d84952301433d8a7d9513549d738d55372c58bb4e83798151e8228e25244e

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