[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: XML formatting

Adam,

Try putting the code in a CDATA section:

<code>
<![CDATA[
	function doSomething() {
		return;
	}
]]>
</code>

The formatter should skip over this section.

--Nick

adam hardy wrote:
I'm writing XDoc documentation and I'm using the XML editor.

My problem is that I have code extracts in my documentation, and I don't want the XML editor to reformat the code blocks (which will remove the CRLFs and destroy the code readability).

Is there a tag I can wrap them in which the XML editor format operation will ignore?

Sorry if this is the wrong forum - it seems the most suitable on the list of newsgroups. If not, which would be the right place?

Thanks
Adam