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:
// 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;
}
Block quotes end up inside the for loop when the wiki page is
previewed/saved. Here is the generated HTML:
// 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;
}
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