Skip to content

Add CSS and JS syntax highlighting#266

Merged
lups2000 merged 2 commits intomitmproxy:mainfrom
mhils:css-highlight
May 31, 2025
Merged

Add CSS and JS syntax highlighting#266
lups2000 merged 2 commits intomitmproxy:mainfrom
mhils:css-highlight

Conversation

@mhils
Copy link
Copy Markdown
Member

@mhils mhils commented May 31, 2025

This PR adds "css" and "javascript" syntax highlighting.

@mhils mhils requested a review from lups2000 May 31, 2025 11:26
@mhils mhils requested a review from Copilot May 31, 2025 11:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds syntax highlighting support for CSS and JavaScript in addition to the existing XML and YAML highlighting functionality.

  • Updated function signatures and language enums to incorporate "css" and "javascript".
  • Added new modules and tests for CSS and JavaScript syntax highlighting.
  • Adjusted dependency ordering in Cargo.toml and updated changelog accordingly.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
mitmproxy-rs/mitmproxy_rs/syntax_highlight.pyi Extended language literal to include CSS and JavaScript.
mitmproxy-highlight/src/yaml.rs Renamed functions to a consistent naming scheme and updated tests.
mitmproxy-highlight/src/xml.rs Renamed functions to a consistent naming scheme and updated tests.
mitmproxy-highlight/src/lib.rs Expanded Language enum and updated match logic to include new variants.
mitmproxy-highlight/src/javascript.rs Added new module for JavaScript syntax highlighting with tests.
mitmproxy-highlight/src/css.rs Added new module for CSS syntax highlighting with tests.
mitmproxy-highlight/src/common.rs Renamed internal test function to reflect tag usage.
mitmproxy-highlight/Cargo.toml Added new dependencies and reordered existing ones.
CHANGELOG.md Documented changes for CSS and JS syntax highlighting.

Comment thread mitmproxy-highlight/src/css.rs
@lups2000 lups2000 merged commit f6d16b7 into mitmproxy:main May 31, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants