Strange indentation on firstline of code block,

Oct 3, 2013 at 1:37 PM

I experience stange behaviour using the <code> maml element.
My code is the following:
<?xml version="1.0" encoding="utf-8"?>
<topic id="89faf755-5cbe-4fa1-8421-61aca6111100" revisionNumber="1">


        <code  language="xml">
        &lt;appender name=&quot;ServerFileAppender&quot; type=&quot;Ubiquis.Kernel.Core.Log4Net.SbfLogFileAppender&quot;&gt;
        &#160; ...
        <code  language="xml">


When I preview this in Sandcastle Help builder, everything is ok.
When I build the doc, an view the resuting HTML, the first line of code is not align on left we the next lines of code.

I look to the resulting HTML, and find that the first line of code is contains inside a <pre> tags, and that there is linefeed, and leading spaces before the <span> tags.
                    <span class="highlight-lineno">1</span>
                    <span class="highlight-lnborder"></span>
                    <span class="highlight-spacerShort"></span>
                    <span class="highlight-xml-bracket">&lt;</span>
                    <span class="highlight-xml-tag">appender</span> <span class="highlight-xml-attribute-name">name</span><span class="highlight-xml-attribute-equal">=</span><span class="highlight-xml-attribute-value">"ServerFileAppender"</span> <span class="highlight-xml-attribute-name">type</span><span class="highlight-xml-attribute-equal">=</span><span class="highlight-xml-attribute-value">"Ubiquis.Kernel.Core.Log4Net.SbfLogFileAppender"</span><span class="highlight-xml-bracket">&gt;</span> 
<span class="highlight-lineno">2</span><span class="highlight-lnborder"></span><span class="highlight-spacerShort"></span>  ...
Does someone know how to fix this ?

Oct 4, 2013 at 4:03 PM
Edited Oct 4, 2013 at 4:04 PM
If you're using the Sandcastle Help File Builder, you've probably got the Indent HTML option enabled. Turn it off as it's only for testing and troubleshooting. That will fix the code indent issue.

Also, please note that this project has been discontinued and may not be monitored as frequently. For future questions or issues concerning Sandcastle or SHFB, post them over on the Sandcastle Help File Builder project's discussion page. Thanks.