Add syntax highlighting for DiffX metadata examples.

Review Request #11694 — Created June 30, 2021 and submitted

Information

DiffX
master

Reviewers

This improves the Pygments lexer for DiffX, fine-tuning the rules and
adding a second lexer specifically for DiffX metadata rules.

This new lexer, diffx-metadata, is used for each of our metadata
examples in the DiffX specification.

The main lexer has had some refinements. It's now able to leverage the
standard Diff lexer for diff sections (along with support for binary
file delta lines), and it's more strict about the section names and
levels it's allowed to highlight (helping spot problems in any examples
that we may write).

As the new lexer rules require content in content sections, one of the
earlier examples of valid headers had to be updated to avoid having two
content sections in a row. Ideally, the lexer would be fine with blank
entries like this, but it's easier said than done with the way lexers
work. So, we're limiting the examples to one empty (final) content
section.

Built the docs. Checked every code block to make sure it was highlighted
right.

Summary ID
Add syntax highlighting for DiffX metadata examples.
This improves the Pygments lexer for DiffX, fine-tuning the rules and adding a second lexer specifically for DiffX metadata rules. This new lexer, `diffx-metadata`, is used for each of our metadata examples in the DiffX specification. The main lexer has had some refinements. It's now able to leverage the standard Diff lexer for diff sections (along with support for binary file `delta` lines), and it's more strict about the section names and levels it's allowed to highlight (helping spot problems in any examples that we may write). As the new lexer rules require content in content sections, one of the earlier examples of valid headers had to be updated to avoid having two content sections in a row. Ideally, the lexer would be fine with blank entries like this, but it's easier said than done with the way lexers work. So, we're limiting the examples to one empty (final) content section.
468e5ac4cdf7e5ae0dc3c7d0634cf7ccf6937756
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...