docs: private void parseTemplateCommands() throws MiniTemplator.TemplateSyntaxException {
          int p = 0; // p is the current position within templateText
          while (true) {
              int p0 = templateText.indexOf(cmdStartStr, p); // p0 is the start of the current command
              boolean shortForm = false;
              if (shortFormEnabled && p0 != p) {
                  if (p0 == -1) {
                      p0 = templateText.indexOf(cmdStartStrShort, p);
                      shortForm = true;
                  } else {
                      int p2 = templateText.substring(p, p0).indexOf(cmdStartStrShort);
                      if (p2 != -1) {
                          p0 = p + p2;
                          shortForm = true;
                      }
                  }
              }
              if (p0 == -1) { // no more commands
                  break;
              }
              conditionalExclude(p, p0); // process text up to the start of the current command
              if (shortForm) { // short form command
                  p = templateText.indexOf(cmdEndStrShort, p0 + cmdStartStrShort.length());
                  if (p == -1) { // if no terminating ">" is found, we process it as normal text
                      p = p0 + cmdStartStrShort.length();
                      conditionalExclude(p0, p);
                      continue;
                  }
                  p += cmdEndStrShort.length();
                  String cmdLine = templateText.substring(p0 + cmdStartStrShort.length(), p - cmdEndStrShort.length());
                  if (!processShortFormTemplateCommand(cmdLine, p0, p)) {
                      // If a short form command is not recognized, we process the whole command structure are normal
                      // text.
                      conditionalExclude(p0, p);
                  }
              } else { // normal (long) form command
                  p = templateText.indexOf(cmdEndStr, p0 + cmdStartStr.length());
                  if (p == -1) {
                      throw new MiniTemplator.TemplateSyntaxException(
                              "Invalid HTML comment in template at offset " + p0 + ".");
                  }
                  p += cmdEndStr.length();
                  String cmdLine = templateText.substring(p0 + cmdStartStr.length(), p - cmdEndStr.length());
                  resumeCmdParsingFromStart = false;
                  if (!processTemplateCommand(cmdLine, p0, p)) {
                      conditionalExclude(p0, p);
                  } // process as normal temlate text
                  if (resumeCmdParsingFromStart) { // (if a subtemplate has been included)
                      p = p0;
                  }
              }
          }
      }