Skip to content

MatthiasHunt/wordpress-syntax-highlighter

Repository files navigation

This extension provides syntax highlighting for the following WordPress syntaxes that exist inside traditional comment blocks:

  • Plugin header fields (PHP)
  • Block patten fields (PHP)
  • Theme header fields (style.css)
  • Block markup (HTML + JSON)

Examples

HTML

Screenshot of an HTML file containing colorized WordPress blocks

CSS

Screenshot of a CSS WordPress theme file containing a colorized header

PHP

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Additional Features

The Syntax Highlighter also implements rules for pattern/header field validation based on the following official documentation:

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Unmatched brackets cause error highlighting inside the embedded JSON of WordPress blocks

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Credits

This project was inspired by Gutenberg Comment Highlight by @chrisrhymes

Wapuu design by @marktimemedia

About

A VS Code Extension that adds syntax highlighting to WordPress and Gutenberg decorators and function calls that exist inside traditional comment blocks

Topics

Resources

License

Stars

9 stars

Watchers

0 watching

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors