2012-11-09 12:33:15
Syntax Highlighter module and ATutor preprocessing
ATutor version - 2.1
I'm trying to use the Syntax Highlighter module for code segments but am having trouble because of ATutor's preprocessing
of the content. It works fine for the '<' and '>' characters. When the code segment contains [i], ATutor replaces it with
the <em> tag and in a newline command '\n' the backslash is removed. Below is a sample of the code I'm trying to display.
Is there anyway I can stop ATutor from preprocessing code segments? In the past, before using the Syntax Highlighter module, I would have to replace <, >, backslashes, and [i] in code with the html special characters. I would like to get away from having to do this. Plus, if I do that it makes the Syntax Highlighter module useless.
<pre class="c">#include <stdlib.h>
#include <stdio.h>
#include "mpi.h"
main (int argc, char* argv[])
{
int procID, nproc, root, source, target, tag;
int k, ncolors, pcolor;
int *colorArray;
char color[10];
MPI_Status status;
// Set the rank 0 process as the root process
root = 0;
// Generate three colors for color array, where white = 0, red = 1, and green = 2
ncolors = 3;
colorArray = (int*) malloc(sizeof(int) * ncolors);
for (i = 0; i < ncolors; i++)
{
colorArray[i] = i;
}
...
printf("proc %d has color %s\n", root, color);
...
}</pre>
Thanks, Sandie