Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1.68 KB

README.md

File metadata and controls

41 lines (24 loc) · 1.68 KB

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