title: jTidy pretty print custom HTML tag
body: <p>I'm trying to use JTidy to pretty print a well formed HTML generated by the user:</p>
  
  <pre><code>&lt;div class="component-holder ng-binding ng-scope ui-draggable ui-draggable-handle" data-component="cronos-datasource" id="cronos-datasource-817277"&gt;
      &lt;datasource name="" entity="" key="" endpoint="" rows-per-page=""&gt;
          &lt;i class="cpn cpn-datasource"&gt;&lt;/i&gt;
      &lt;/datasource&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my config:</p>
  
  <pre><code>Tidy tidy = new Tidy();
  tidy.setXHTML(true);
  tidy.setIndentContent(true);
  tidy.setPrintBodyOnly(true);
  tidy.setTidyMark(false);
  tidy.setWraplen(2000);
  tidy.setDropProprietaryAttributes(false);
  tidy.setDropEmptyParas(false);
  tidy.setTrimEmptyElements(false);
  </code></pre>
  
  <p>But jTidy is removing my AngularJS <code>datasource</code> directive. Is there a way to workarround this issue?</p>
  
  <p>I'm getting this from the log:</p>
  
  <pre><code>line 1 column 191 - Error: &lt;datasource&gt; is not recognized!
  line 1 column 191 - Warning: discarding unexpected &lt;datasource&gt;
  </code></pre>
  
  <p>Removing <code>tidy.setXHTML(true)</code> or setting it to false and adding <code>tidy.setXmlTags(true)</code> actually solve this issue and it start to consider user defined tags, but this is not a good solution because JTidy starts trying to close self enclosing tags.</p>
  
  <pre><code> &lt;!-- this code --&gt;
   &lt;img src="anythig.jpg"/&gt;
   &lt;div id="anyid"&gt;&lt;/div&gt; 
  
   &lt;!-- will become --&gt;
   &lt;img src="anythig.jpg"&gt;
       &lt;div id="anyid"&gt;&lt;/div&gt;
   &lt;/img&gt;
  </code></pre>
  
  <p>I need a formatter for a text editor. I can't assure what directives our users will define and use. It must be a generic solution which works for any user defined directive</p>