I've tired various different ways of formatting code examples, both within <example> tags and outside them. Either way there just doesn't seem to be a way to reproduce consistent formatting. At times, random <p> tags are added to the HTML, at other times a single space becomes 6 spaces in the resulting HTML, I've tried numerous ways to get this working and there just doesn't seem to be a way that reliably works. The output is always skewed. Missing newlines, newlines when I don't want them. Extra tabs I didn't add, no tabs where I wanted tabs. This is very broken. I've tried new lines before the code blocks, that doesn't help.
Here's a simple example:
/// <code>
/// using (var m = new MyClass())
/// {
/// var s = m.Method("Guess the formatting");
/// }
/// </code>
This results in some extra tabs appearing I didn't ask for.
Or a more complex example:
/// <code>
/// var myobj = new MyClass { Hostname = "server", Port = 3306, Username = "user", Password = "pwd1234" };
///
/// using (var m = new MyClass(myobj))
/// {
/// // Load a pre existing schema into a Schema object
/// var s = m.LoadSchema("my_schema");
/// }
/// </code>
in this case my new lines and tabs are all removed???:
The strange thing with this second example is that the HTML code has a <p> tag generated within the <code> tag like so:
<pre><code class="lang-csharp">var myobj = new MyClass { Hostname = "server", Port = 3306, Username = "user", Password = "pwd1234" };
<p>using (var m = new MyClass(myobj))
{
// Load a pre existing schema into a Schema object
var s = m.LoadSchema("my_schema");
}</p></code></pre>
I've tired various different ways of formatting code examples, both within <example> tags and outside them. Either way there just doesn't seem to be a way to reproduce consistent formatting. At times, random <p> tags are added to the HTML, at other times a single space becomes 6 spaces in the resulting HTML, I've tried numerous ways to get this working and there just doesn't seem to be a way that reliably works. The output is always skewed. Missing newlines, newlines when I don't want them. Extra tabs I didn't add, no tabs where I wanted tabs. This is very broken. I've tried new lines before the code blocks, that doesn't help.
Here's a simple example:
This results in some extra tabs appearing I didn't ask for. Or a more complex example:
in this case my new lines and tabs are all removed???:
The strange thing with this second example is that the HTML code has a <p> tag generated within the <code> tag like so: