#133 Merged
Repository
cmclaughlin/pygments-puppet pygments-puppet
Branch
default
Repository
birkenfeld/pygments-main pygments-main
Branch
default

Puppet lexer

Author
  1. Charles McLaughlin avatarCharles McLaughlin
Reviewers
Description

I'd like to get this Puppet lexer pulled in. However, I should warn you:

  • This is the first Pygments lexer I've attempted
  • My regex skills aren't great
  • I'm not sure how good or bad this attempt is

If you see anything wrong I'd appreciate feedback.

I've tested this against several modules from Puppet Labs and my own. I've compared the output against Emacs' Puppet syntax highlighting and I'm happy with what I see.

A few more points:

  • Before writing this I found a couple other people attempted a Puppet lexer, but either there was no license or an incompatible one so I wrote my own
  • I wasn't sure if you'd want the new class in it's own file or perhaps in others.py, but it should be easy to merge or move it around if desired
  • This should address these two issues: Syntax highlighting for Puppet and Add Puppet Lexer

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.