Skip to content

A VS Code extension that enhances code readability by providing syntax highlighting for embedded JavaScript within XML CDATA tags.

License

Notifications You must be signed in to change notification settings

dinogomez/CDATA-JS-Highlighter

Repository files navigation

Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install PaulGomez.cdata-js-highlighter

Highlight Your CDATA Embedded JavaScript


❌ Without Syntax Highlighting Alt text ✅ With Syntax Highlighting Alt text

Installation

You can download the extension from the Extensions(Ctrl+Shift+X) tab in Visual Studio Code or directly from Visual Studio Marketplace, link attached below.

Download CDATA JS Highlighter

About

By default, many editors treat XML files containing JavaScript code inside CDATA tags as pure XML, often overlooking the embedded JavaScript. This extension elevates the XML syntax highlighting experience by intelligently identifying JavaScript code within CDATA tags and providing dedicated highlighting. Enjoy improved code readability and a more seamless workflow.

Author Notes

I used to struggle when working with JavaScript within CDATA tags. That's why I created this extension, to simplify the process as well as make it easier to work with. Feel free to open an issue or send a pull request.

The screenshots also feature the SpaceCamp color theme. A personal creation of mine, ported from a beloved Vim theme also available here. Now available as a VS Code theme, feel free to explore and give it a try!

About

A VS Code extension that enhances code readability by providing syntax highlighting for embedded JavaScript within XML CDATA tags.

Topics

Resources

License

Stars

Watchers

Forks