Matt Layman 9/3/2015

Highlighting new file formats with Pygments

Read Original

This article details the process of adding support for the Test Anything Protocol (TAP) file format to the Pygments syntax highlighter. It explains how to create a new lexer by subclassing RegexLexer, defining token patterns with regular expressions, and managing context shifts during parsing to enable proper code highlighting in documentation.

Highlighting new file formats with Pygments

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet