Collecting Pages from a collection by keyword

For example, when this code is interpreted as Markdown:

<p>This is a test</p>
    
    <p>This is a test</p>

It produces the following result (quoted for exposition). In Markdown, the 4 spaces before the second <P> create a code-block. Markdown isn’t a pure super-set of HTML, so you will sometimes get unexpected results when copy-n-pasting HTML into Markdown:

This is a test

<p>This is a test</p>

The Markdown generated HTML is:

<p>This is a test</p>
    
 <pre><code><p>This is a test</p></code><pre>