/// <summary> /// Fügt ein neues Morphem hinzu /// </summary> /// <param name="type">Der Typ</param> /// <param name="text">Der Text</param> private void Push(MarkdownMorphemeState type, string text = null) { var morpheme = new MarkdownMorpheme() { Type = type }; if (!string.IsNullOrWhiteSpace(text?.Trim())) { morpheme.Text.Append(text?.Trim()); } Stack.Push(morpheme); }
/// <summary> /// Ändert den Typ des aktuellen Morphems /// </summary> /// <param name="type">Der neue Type</param> private void Change(MarkdownMorphemeState type) { var peek = Stack.Peek(); peek.Type = type; }