[oXygen-user] Is there a way to stop oxygen from reformatting lines of text marked with <codeblock> or <lines>?

Steve Matlock
Tue Feb 2 13:48:05 CST 2010


I am writing documentation that includes code samples. I currently am
putting them in the concept type marked with <codeblock> or <lines> (I've
not decided yet which is the best solution).

But, if I reformat the text (because other content I'm placing in the <p>
blocks comes in as one very long line) so I can more easily edit the xml,
the content in the <codeblock> or <lines> section is reformatted, losing all
the carefully placed indents in the code.That is, the code that would appear
in the PDF or HTML is reformatted so that it is all flush left with an
indent of about 1 inch. I want it to remain indented hierarchically.

So for example, a code sample as it appears in the Author view
<script>
   Some script here
      A subroutine here
      More stuff
</script>

etc.

It becomes this
<script> Some script here A subroutine here More stuff </script>

which, technically, would work as code, but it hard to read in the
documentation.

The code in the Editor view looks like this:
<codeblock>
&lt;script>
  Some script here
    A subroutine here
    More stuff
&gt;/script>
</codeblock>

and so on. When it's reformated it looks like this
<codeblock>
                     &lt;script> Some script here  A subroutine here More
stuff &gt;/script>
</codeblock>


-- 
Steve Matlock
http://nohomeformyblog.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20100202/a91f4198/attachment.html 


More information about the oXygen-user mailing list