Lets your template extend a built-in one and fill its blocks
All 3 scenarios hold
Pebble templates render a report, and a project can supply its own. Point the reporter at a template directory. The reporter then uses the files in that directory in place of the built-in templates, or on top of them.
The rules below read a report of one test class named Calendar. That class holds one table named Leap years, with the columns Year and Leap? and one row, 2004 and Yes. A report that small lets a rule state a whole page.
Replacing a template means rewriting the page. Extending one means naming the built-in template and filling only the blocks it leaves open. The reporter then keeps rendering the table itself.
There are three such blocks: frontMatter above the page, title in place of the generated heading, and footer below it.
A template that fills one block reads:
{% extends "table.md.peb" %} {% block frontMatter %} … {% endblock %}
| Scenario | Block | Filled with | Page? |
|---|---|---|---|
| Front matter above the page | frontMatter |
|
|
| A heading of your own | title |
|
|
| A footer below the page | footer |
|
|