docs: private int recursiveEmitLine(final StringBuilder out, final String in, final int start, final MarkToken token)
      {
          int pos = start, a, b;
          final StringBuilder temp = new StringBuilder();
          while (pos < in.length())
          {
              final MarkToken mt = this.getToken(in, pos);
              if (token != MarkToken.NONE
                      && (mt == token || token == MarkToken.EM_STAR && mt == MarkToken.STRONG_STAR || token == MarkToken.EM_UNDERSCORE
                              && mt == MarkToken.STRONG_UNDERSCORE))
              {
                  return pos;
              }
  
              switch (mt)
              {
              case IMAGE:
              case LINK:
                  temp.setLength(0);
                  b = this.checkLink(temp, in, pos, mt);
                  if (b > 0)
                  {
                      out.append(temp);
                      pos = b;
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case EM_STAR:
              case EM_UNDERSCORE:
                  temp.setLength(0);
                  b = this.recursiveEmitLine(temp, in, pos + 1, mt);
                  if (b > 0)
                  {
                      this.config.decorator.openEmphasis(out);
                      out.append(temp);
                      this.config.decorator.closeEmphasis(out);
                      pos = b;
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case STRONG_STAR:
              case STRONG_UNDERSCORE:
                  temp.setLength(0);
                  b = this.recursiveEmitLine(temp, in, pos + 2, mt);
                  if (b > 0)
                  {
                      this.config.decorator.openStrong(out);
                      out.append(temp);
                      this.config.decorator.closeStrong(out);
                      pos = b + 1;
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case SUPER:
                  temp.setLength(0);
                  b = this.recursiveEmitLine(temp, in, pos + 1, mt);
                  if (b > 0)
                  {
                      this.config.decorator.openSuper(out);
                      out.append(temp);
                      this.config.decorator.closeSuper(out);
                      pos = b;
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case CODE_SINGLE:
              case CODE_DOUBLE:
                  a = pos + (mt == MarkToken.CODE_DOUBLE ? 2 : 1);
                  b = this.findToken(in, a, mt);
                  if (b > 0)
                  {
                      pos = b + (mt == MarkToken.CODE_DOUBLE ? 1 : 0);
                      while (a < b && in.charAt(a) == ' ')
                      {
                          a++;
                      }
                      if (a < b)
                      {
                          while (in.charAt(b - 1) == ' ')
                          {
                              b--;
                          }
                          this.config.decorator.openCodeSpan(out);
                          Utils.appendCode(out, in, a, b);
                          this.config.decorator.closeCodeSpan(out);
                      }
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case HTML:
                  temp.setLength(0);
                  b = this.checkHtml(temp, in, pos);
                  if (b > 0)
                  {
                      out.append(temp);
                      pos = b;
                  }
                  else
                  {
                      out.append("&lt;");
                  }
                  break;
              case ENTITY:
                  temp.setLength(0);
                  b = checkEntity(temp, in, pos);
                  if (b > 0)
                  {
                      out.append(temp);
                      pos = b;
                  }
                  else
                  {
                      out.append("&amp;");
                  }
                  break;
              case X_LINK_OPEN:
                  temp.setLength(0);
                  b = this.recursiveEmitLine(temp, in, pos + 2, MarkToken.X_LINK_CLOSE);
                  if (b > 0 && this.config.specialLinkEmitter != null)
                  {
                      this.config.specialLinkEmitter.emitSpan(out, temp.toString());
                      pos = b + 1;
                  }
                  else
                  {
                      out.append(in.charAt(pos));
                  }
                  break;
              case X_COPY:
                  out.append("&copy;");
                  pos += 2;
                  break;
              case X_REG:
                  out.append("&reg;");
                  pos += 2;
                  break;
              case X_TRADE:
                  out.append("&trade;");
                  pos += 3;
                  break;
              case X_NDASH:
                  out.append("&ndash;");
                  pos++;
                  break;
              case X_MDASH:
                  out.append("&mdash;");
                  pos += 2;
                  break;
              case X_HELLIP:
                  out.append("&hellip;");
                  pos += 2;
                  break;
              case X_LAQUO:
                  out.append("&laquo;");
                  pos++;
                  break;
              case X_RAQUO:
                  out.append("&raquo;");
                  pos++;
                  break;
              case X_RDQUO:
                  out.append("&rdquo;");
                  break;
              case X_LDQUO:
                  out.append("&ldquo;");
                  break;
              case ESCAPE:
                  pos++;
                  //$FALL-THROUGH$
              default:
                  out.append(in.charAt(pos));
                  break;
              }
              pos++;
          }
          return -1;
      }