]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/output/template/Template.java
UPD: change sprintf-template-syntax for literals
[gigi.git] / src / org / cacert / gigi / output / template / Template.java
index ac59f3135ef75a11639710a81983be75ab990c53..dca6568b7432847f4db4cca56f9840e9bc9cab41 100644 (file)
@@ -121,9 +121,15 @@ public class Template implements Outputable {
         } else if (s2.startsWith("=s,")) {
             String command = s2.substring(3);
             final LinkedList<String> store = new LinkedList<String>();
-            while (command.startsWith("$")) {
-                int idx = command.indexOf(",");
-                store.add(command.substring(0, idx));
+            while (command.startsWith("$") || command.startsWith("\"") || command.startsWith("!\"")) {
+                int idx;
+                if (command.startsWith("\"") || command.startsWith("!\"")) {
+                    idx = command.indexOf("\"", command.charAt(0) == '!' ? 2 : 1) + 1;
+                    store.add(command.substring(0, idx - 1));
+                } else {
+                    idx = command.indexOf(",");
+                    store.add(command.substring(0, idx));
+                }
                 command = command.substring(idx + 1);
             }
             final String text = command;