How do I abstract a set of modules to a variable to be included in multiple pipelines?
<p>I'm trying to abstract a set of modules to use them in multiple pipelines.  I have this before my first pipeline.</p>

<pre><code>IModule[] textReplacement = new IModule[] {
    Replace(" -- ", "&amp;mdash;"),
    Replace("--", "&amp;mdash;"),
    Trace("Text replacement performed...")
};
</code></pre>

<p>Then, in a pipeline:</p>

<pre><code>Pipelines.Add("Pages",
   ReadFiles("*.md"),
   Concat(textReplacement),
   WriteFiles("*.html)
);
</code></pre>

<p>When I execute, <code>Text replacement performed...</code> is written to the console, so the execution flow is working through those two modules. However --</p>

<ol>
<li><p>Text replacement does not actually occur.  (Or, if it does, it's not persisted in the documents that continue down the pipeline.)</p></li>
<li><p>An empty document is added to document set.</p></li>
</ol>

<p>The documentation for <code>Concat</code> clearly states:</p>

<blockquote>
  <p>The specified modules are executed with an empty initial document and then outputs the original input documents without modification concatenated with the results from the specified module sequence.</p>
</blockquote>

<p>I just can't figure out why this is, why it would be needed or helpful, or how to get rid of it.  I can't have am empty document floating around in my document set, or else is causes errors in subsequent pipelines.</p>