doc: move js to separate file to allow easy edits
authorRamprasad Venkataraman <ramv@illinois.edu>
Tue, 31 Jul 2012 02:25:56 +0000 (21:25 -0500)
committerRamprasad Venkataraman <ramv@illinois.edu>
Tue, 31 Jul 2012 02:42:52 +0000 (21:42 -0500)
doc/Makefile.common
doc/dot.latex2html-init
doc/hilitesyntax.js [new file with mode: 0644]

index def838f990fc9ce8997d7a1b4da5a755afd13fe0..0e73916c160ca015ffb0db1dd4e177d66c885a1d 100644 (file)
@@ -57,6 +57,7 @@ $(FILE): $(TEX) $(FILE).aux
        -@rm -fr $(FILE)/*.html $(FILE)/*.aux
        -@mkdir $(FILE)
        -@/bin/cp ../manual.css $(FILE)
+       -@/bin/cp ../*.js $(FILE)
        -@/bin/cp ../navbarbkgd.png $(FILE)
        -/bin/cp title.html $(FILE)
        $(L2H) -split 0 $(FILE).tex
index 44dd637c74a87eefa30fbd3f3fe7809f475150f2..aa0277af05a2d7d41c7f4db67267e5b36403b545 100644 (file)
@@ -219,17 +219,7 @@ sub head_tags {
     "<replace_with_script src='http://charm.cs.illinois.edu/codemirror/lib/util/runmode.js' type='text/javascript'></script>\n" .
     "<link href='http://charm.cs.illinois.edu/codemirror/lib/codemirror.css' rel='stylesheet' type='text/css'>\n" .
     "<link href='http://charm.cs.illinois.edu/codemirror/theme/lesser-dark.css' rel='stylesheet' type='text/css'>\n" .
-    "<replace_with_script type='text/javascript'>\n" .
-'//<![CDATA[
-// Grab all code snippets and paint it to highlight syntax
-$(document).ready( function() {
-    $("code").each( function(idx) {
-        CodeMirror.runMode($(this).text(), "text/x-c++src", $(this).get(0));
-    })
-    .addClass("cm-s-lesser-dark");
-} )
-//]]>' .
-    "</script>\n" .
+    "<replace_with_script src='hilitesyntax.js' type='text/javascript'></script>\n" .
     "<!-- end of inserted tags -->\n"
 }
 
diff --git a/doc/hilitesyntax.js b/doc/hilitesyntax.js
new file mode 100644 (file)
index 0000000..388659f
--- /dev/null
@@ -0,0 +1,8 @@
+// Grab all code snippets and paint it to highlight syntax
+$(document).ready( function() {
+    $("code").each( function(idx) {
+        CodeMirror.runMode($(this).text(), "text/x-c++src", $(this).get(0));
+    })
+    .addClass("cm-s-lesser-dark");
+} )
+