Fix example update issues introduced when switching ReSpec versions.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Sun, 03 Jun 2012 12:46:12 -0700
changeset 690 156f3aabd40d
parent 689 2d8e79c43e26
child 691 100eddefa548
Fix example update issues introduced when switching ReSpec versions.
spec/latest/json-ld-api/index.html
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-api/index.html	Wed May 30 18:17:45 2012 -0700
+++ b/spec/latest/json-ld-api/index.html	Sun Jun 03 12:46:12 2012 -0700
@@ -228,39 +228,22 @@
           alternateFormats: [ {uri: "diff-20120524.html", label: "diff to previous version"} ],
       };
 
+      function _esc(s) {
+          s = s.replace(/&/g,'&amp;');
+          s = s.replace(/>/g,'&gt;');
+          s = s.replace(/"/g,'&quot;');
+          s = s.replace(/</g,'&lt;');
+          return s;
+      }
+
       function updateExample(doc, content) {
         // perform transformations to make it render and prettier
         content = content.replace(/<!--/, '');
         content = content.replace(/-->/, '');
-        content = doc._esc(content);
+        content = _esc(content);
         content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="diff">$1</span>') ;
         return content ;
       }
-
-      function updateDTD(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/!ENTITY % ([^ \t\r\n]*)/g, '!ENTITY <span class="entity">% $1</span>');
-        content = content.replace(/!ELEMENT ([^ \t$]*)/mg, '!ELEMENT <span class="element">$1</span>');
-        return content;
-      }
-
-      function updateSchema(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/&lt;xs:element\s+name=&quot;([^&]*)&quot;/g, '&lt;xs:element name="<span class="element" id="schema_element_$1">$1</span>"') ;
-        return content;
-      }
-
-      function updateTTL(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="sh_sourceCode">' + doc._esc(content) + '</pre>';
-        content = content.replace(/@prefix/g, '<span class="sh_keyword">@prefix</span>');
-        return content;
-      }
 //]]>
   </script>
 <style type="text/css">
--- a/spec/latest/json-ld-syntax/index.html	Wed May 30 18:17:45 2012 -0700
+++ b/spec/latest/json-ld-syntax/index.html	Sun Jun 03 12:46:12 2012 -0700
@@ -224,39 +224,22 @@
           alternateFormats: [ {uri: "diff-20120522.html", label: "diff to previous version"} ],
       };
 
+      function _esc(s) {
+          s = s.replace(/&/g,'&amp;');
+          s = s.replace(/>/g,'&gt;');
+          s = s.replace(/"/g,'&quot;');
+          s = s.replace(/</g,'&lt;');
+          return s;
+      }
+
       function updateExample(doc, content) {
         // perform transformations to make it render and prettier
         content = content.replace(/<!--/, '');
         content = content.replace(/-->/, '');
-        content = doc._esc(content);
+        content = _esc(content);
         content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="diff">$1</span>') ;
         return content ;
       }
-
-      function updateDTD(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/!ENTITY % ([^ \t\r\n]*)/g, '!ENTITY <span class="entity">% $1</span>');
-        content = content.replace(/!ELEMENT ([^ \t$]*)/mg, '!ELEMENT <span class="element">$1</span>');
-        return content;
-      }
-
-      function updateSchema(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
-        content = content.replace(/&lt;xs:element\s+name=&quot;([^&]*)&quot;/g, '&lt;xs:element name="<span class="element" id="schema_element_$1">$1</span>"') ;
-        return content;
-      }
-
-      function updateTTL(doc, content) {
-        // perform transformations to
-        // make it render and prettier
-        content = '<pre class="sh_sourceCode">' + doc._esc(content) + '</pre>';
-        content = content.replace(/@prefix/g, '<span class="sh_keyword">@prefix</span>');
-        return content;
-      }
 //]]>
   </script>
 <style type="text/css">