When I put code formatted like this into a wiki page, block quotes are detected and inserted into the code. For example, put this code in a wiki page:
<pre><code> // Grow Hairs vector dir = { 0, 1, 0 }; // dir = @N; // grow in normal direction float len = 1.0; int steps = 10; float jitter = 0.1; float seed = 0.12345; vector pos = @P; int pr = addprim(geoself(), "polyline"); // Start the curve with our point addvertex(geoself(), pr, @ptnum); for (int i = 0; i < steps; i++) { pos += dir * len / steps; pos += (vector(rand( @ptnum + seed )) - 0.5) * jitter; // Clone our point to copy attributes int pt = addpoint(geoself(), @ptnum); // But write a new position setpointattrib(geoself(), "P", pt, pos); // Connect the new point to our curve. addvertex(geoself(), pr, pt); seed += $PI; } </code></pre> Block quotes end up inside the for loop when the wiki page is previewed/saved. Here is the generated HTML: <pre><code> // Grow Hairs vector dir = { 0, 1, 0 }; // dir = @N; // grow in normal direction float len = 1.0; int steps = 10; float jitter = 0.1; float seed = 0.12345; <p>vector pos = @P; int pr = addprim(geoself(), "polyline"); <p>// Start the curve with our point addvertex(geoself(), pr, @ptnum); for (int i = 0; i < steps; i++) { pos += dir * len / steps; pos += (vector(rand( @ptnum + seed )) - 0.5) * jitter; <blockquote>// Clone our point to copy attributes int pt = addpoint(geoself(), @ptnum); // But write a new position setpointattrib(geoself(), "P", pt, pos); </blockquote> <blockquote>// Connect the new point to our curve. addvertex(geoself(), pr, pt); seed += $PI; } </blockquote></code></pre> Is this a bug? Also, should the paragraph tags not end up inside pre/code as well? Thanks! Chris
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users