Exemplo n.º 1
0
 public string Render()
 {
     State = new CommonState(Index);
     UsedStates.Add(State);
     for (; Index < Markdown.Length; Index++)
     {
         TryRenderChar();
     }
     SetTages();
     return(RemoveEscapeChars(Markdown));
 }
Exemplo n.º 2
0
        private void CheckAndChangeState()
        {
            var underlinesCount = UnderilinesCount();

            if (underlinesCount > 2)
            {
                Index += underlinesCount;
                return;
            }
            if (!State.IsNeedChangeState(this, underlinesCount))
            {
                return;
            }
            State = State.ChangeState(this, underlinesCount);
            if (UsedStates.Count <= 1 || UsedStates[UsedStates.Count - 1].Parent != State)
            {
                UsedStates.Add(State);
            }
        }