Repository navigation
(docs) add Pug to SUPPORTED_LANGUAGES - #4558
Open
seebaermichi wants to merge 1 commit into
Open
seebaermichi wants to merge 1 commit into
seebaermichi wants to merge 1 commit into
Conversation
Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seebaermichi
pushed a commit
to seebaermichi/nera-highlightjs-pug
that referenced
this pull request
Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Pug (formerly Jade) to
SUPPORTED_LANGUAGES.mdas a 3rd-party grammar: @nera-static/highlightjs-pug (npm, live demo).Pug has no grammar in core or in the 3rd-party list, and the existing unscoped
highlightjs-pugpackage on npm is a stripped HAML copy that only highlights.classand#id. This one covers tags, class/id shorthand, attributes with JavaScript values (also across lines), keywords, include/extends paths, mixins, comments, doctype, piped text, block expansion, code lines,=/!=output and#{}/!{}/#[]interpolation, using standard scopes. The limits of a pattern-based grammar for an indentation language (text blocks, filter bodies) are documented in its README. The demo shows real templates in stock themes, with each token's scope on hover.The package follows
extra/3RD_PARTY_QUICK_START.md:src/languages/pug.js, markup tests intest/markup/pug/, and committeddist/builds (pug.min.jsregistering on the globalhljs,pug.es.min.js).Changes
SUPPORTED_LANGUAGES.md, alphabetically between Protocol Buffers and Puppet.Checklist
ONLY_EXTRA=true npm run test-markupwith the package inextra/), andnpm testpasses with it installed. With Pug registered, none of the 199 samples intest/detectchanges its detected language.The grammar was written with AI assistance and reviewed by me.
Assisted-by: Claude Opus 5.5