Skip to main content

Thonny plugin: syntax highlighting for HTML files

Project description

thonny-html-highlight

Syntax highlighting for HTML files in the Thonny IDE.

By default Thonny treats .html and .htm files as plain text. This plugin adds colour highlighting for:

  • Tag names (div, span, a, …)
  • Attribute names (class, href, data-value, …)
  • Attribute values ("foo", 'bar', …)
  • HTML comments (<!-- … -->)
  • DOCTYPE declarations (<!DOCTYPE html>)
  • Entity references (&amp;, &#169;, &#xA9;, …)
  • Angle-bracket punctuation

Requirements

  • Thonny 5.0 or later
  • Python 3.13 or later (bundled with Thonny 5)

Installation

Via Thonny's built-in package manager (recommended)

  1. Open Thonny.
  2. Go to Tools → Manage packages…
  3. Search for thonny-html-highlight.
  4. Click Install.
  5. Restart Thonny.

Via pip / uv (command line)

# Using pip
pip install thonny-html-highlight

# Using uv
uv pip install thonny-html-highlight

Then restart Thonny.

From source (development)

git clone https://github.com/mrmatho/thonny-html-highlight.git
cd thonny-html-highlight
uv pip install -e .

Restart Thonny after installing.

Usage

Open any .html or .htm file in Thonny — highlighting is applied automatically. No configuration is required.

Known limitations

  • Content inside <script> and <style> tags is treated as HTML, which may produce incorrect highlighting for JavaScript or CSS within those blocks.
  • Colours follow Thonny's default light theme. Integration with custom syntax themes is planned for a future release.

Development

# Run tests
uv run pytest

# Run tests with verbose output
uv run pytest -v

Licence

MIT

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

thonny_html_highlight-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

thonny_html_highlight-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file thonny_html_highlight-0.1.0.tar.gz.

File metadata

  • Download URL: thonny_html_highlight-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for thonny_html_highlight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29768e2953f1f78760eb6a139485ecf73cc1d049d952f73cee919a473c06cd3b
MD5 88f651582bec7d7aa6bcc0361d5a0e53
BLAKE2b-256 d32e30548e55ad293970dcede77dfd19726c26d8bd5f3d4a2f365d859464ed03

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_html_highlight-0.1.0.tar.gz:

Publisher: publish.yml on mrmatho/thonny-html-highlight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thonny_html_highlight-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thonny_html_highlight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5db883e985db7aec345945652f8e8c1b029dc5d9102de29eaaeaa5778d2a8f2
MD5 5f702dfd28acf61a56e5c0003fb5b7aa
BLAKE2b-256 6df56060a6ee4adb27f2265fa3e91ed2ba5c95320b78dc4211c16e57d67f2a97

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_html_highlight-0.1.0-py3-none-any.whl:

Publisher: publish.yml on mrmatho/thonny-html-highlight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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