Explorar o código

+ Convert shorthand syntax notation to full notation

michael %!s(int64=22) %!d(string=hai) anos
pai
achega
45910eed90
Modificáronse 1 ficheiros con 21 adicións e 0 borrados
  1. 21 0
      docs/syntax/changeit.pp

+ 21 - 0
docs/syntax/changeit.pp

@@ -0,0 +1,21 @@
+program changeit;
+
+uses sysutils;
+
+var 
+  S : String;
+
+begin
+  While not eof do
+    begin
+    ReadLn(S);
+    S:=StringReplace(S,'\[','\begin{stack}\\',[rfReplaceAll]);
+    S:=StringReplace(S,'\]','\end{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\(','\begin{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\)','\end{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\<','\begin{rep}',[rfReplaceAll]);
+    S:=StringReplace(S,'\>','\end{rep}',[rfReplaceAll]);
+    Writeln(S);
+    end;
+end.
+