docs: public void transfromHeadline ()
    {
      if (m_nHeadlineDepth > 0)
        return;
      int nLevel = 0;
      final Line aLine = m_aLines;
      if (aLine.m_bIsEmpty)
        return;
      int nStart = aLine.m_nLeading;
      while (nStart < aLine.m_sValue.length () && aLine.m_sValue.charAt (nStart) == '#')
      {
        nLevel++;
        nStart++;
      }
      while (nStart < aLine.m_sValue.length () && aLine.m_sValue.charAt (nStart) == ' ')
        nStart++;
      if (nStart >= aLine.m_sValue.length ())
      {
        aLine.setEmpty ();
      }
      else
      {
        int nEnd = aLine.m_sValue.length () - aLine.m_nTrailing - 1;
        while (aLine.m_sValue.charAt (nEnd) == '#')
          nEnd--;
        while (aLine.m_sValue.charAt (nEnd) == ' ')
          nEnd--;
        aLine.m_sValue = aLine.m_sValue.substring (nStart, nEnd + 1);
        aLine.m_nLeading = aLine.m_nTrailing = 0;
      }
      m_nHeadlineDepth = Math.min (nLevel, 6);
    }