/* syntax.js
 * apply simple syntax highlighting to Tetra code
 */

keywords = ["def", "if", "elif", "else", "while", "for", "in", "parallel"];

function applySyntax() {
    /* find all the <pre><code> blocks */
    var snippets = document.querySelectorAll('pre code');

    /* highlight each one */
    for (snippet in snippets) {
        //var text = node.textContent;
        alert("hi");
        //highlighted = text.replace(/def/g, "heyoo");
        //snippet.innerHTML = highlighted;
        //alert(highlighted);
    }
}


@@ -333,18 +333,16 @@
         
-//
 var text
@@ -348,12 +348,15 @@
 t = 
-node
+snippet
 .tex
@@ -377,18 +377,20 @@
     
+//
 alert(
-%22hi%22
+text
 );%0A 
@@ -396,18 +396,16 @@
         
-//
 highligh
@@ -449,18 +449,16 @@
         
-//
 snippet.

work on site