]> foleosoft.com Git - QAnsel.git/commitdiff
Sat Aug 3 08:33:00 PM EDT 2024
authormiha-q <>
Sun, 4 Aug 2024 00:33:00 +0000 (20:33 -0400)
committermiha-q <>
Sun, 4 Aug 2024 00:33:00 +0000 (20:33 -0400)
examples/ghz.txt
src/imports/istina-editor.js
src/index.html
src/src.zip

index 5872d9edf42edb388733c16e7f51deb7eb979f41..7cc4b47fb33c0e293181ec5947011b0356166f95 100644 (file)
@@ -1,4 +1,3 @@
 qreg q[1];
-rx(pi/3) q[0];
-
-born q;
\ No newline at end of file
+rx(1/3pi) q[0];
+sample q;
\ No newline at end of file
index f9d91562d6e814d29a3ef6190704d1d59042fa1c..ac65281d126bf25089b980db8025c1b6b8eff960 100644 (file)
@@ -287,6 +287,21 @@ IstinaEditor.highlightForQAnsel = function(txt)
                }
        );
        txt = txt.replaceAll
+       (
+               /if[(].*?[)]/g,
+               x =>
+               {
+                       var rhs = x.split("(")[1].split(")")[0];
+                       x = "<span class='istina-keyword'>if</span>";
+                       x += "<span class='istina-bracket'>(</span>";
+                       x += rhs;
+                       x += "<span class='istina-bracket'>)</span>";
+                       x = x.replace("==0", "==<span class='istina-number'>0</span>");
+                       x = x.replace("==1", "==<span class='istina-number'>1</span>");
+                       return x;
+               }
+       );
+       txt = txt.replaceAll
        (
                /[/][/].*?([<]div|[<]br|$)/g,
                x =>
index a7bc52cb80c37f7364aeea4f84d4b6867f869843..4f282395e51f0c4a737c9228e430a3a052a4aaa3 100644 (file)
                                {
                                        onComplete: function()
                                        {
-                                               console.log('Chart update complete');
                        }
                        }
                        }
index 42d78fdc70cfa61b12b1a3d84a2a1aa6256195f6..6128211cda6c6d526af67bf7740c0e4d0fd93890 100644 (file)
Binary files a/src/src.zip and b/src/src.zip differ