docs: private static int _checkInlineEntity (final StringBuilder aOut, final String sIn, final int nStart)
    {
      final int nPos = MarkdownHelper.readUntil (aOut, sIn, nStart, ';');
      if (nPos < 0 || aOut.length () < 3)
        return -1;
      if (aOut.charAt (1) == '#')
      {
        if (aOut.charAt (2) == 'x' || aOut.charAt (2) == 'X')
        {
          if (aOut.length () < 4)
            return -1;
          for (int i = 3; i < aOut.length (); i++)
          {
            final char c = aOut.charAt (i);
            if ((c < '0' || c > '9') && ((c < 'a' || c > 'f') && (c < 'A' || c > 'F')))
              return -1;
          }
        }
        else
        {
          for (int i = 2; i < aOut.length (); i++)
          {
            final char c = aOut.charAt (i);
            if (c < '0' || c > '9')
              return -1;
          }
        }
        aOut.append (';');
      }
      else
      {
        for (int i = 1; i < aOut.length (); i++)
        {
          final char c = aOut.charAt (i);
          if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z'))
            return -1;
        }
        aOut.append (';');
        return EHTMLEntity.isValidEntityReference (aOut.toString ()) ? nPos : -1;
      }
  
      return nPos;
    }