Add a {% code_block %} template tag.

Review Request #11905 — Created Jan. 4, 2022 and submitted

Information

Review Board
release-5.0.x

Reviewers

This is a block tag that runs the nested content through Pygments, using
the provided lexer name. This makes it easier to include code samples in
templates without hard-coding Pygments span tags.

Unit tests pass in Python 2 and 3.

Tested this with a template being written for another change. Verified that
the rendering used the correct lexers.

Summary ID
Add a {% code_block %} template tag.
This is a block tag that runs the nested content through Pygments, using the provided lexer name. This makes it easier to include code samples in templates without hard-coding Pygments `span` tags.
f1907d72e936b5aa805f83f63a9855c735cdd6b8
Description From Last Updated

Change to 5.0

daviddavid
david
  1. Ship It!
  2. 
      
chipx86
maubin
  1. Ship It!
  2. 
      
david
  1. 
      
  2. Show all issues

    Change to 5.0

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (c4dab98)