Refinement for #1641

- Reuse unindent mechanism that has introduced by #1377
- Remove trailing whitespace from auto-generated ddoc example
fix Issue 9757 - Ddoc: documented unittest after ditto should work