public void HandleTag(bool opening, string tag, IEditable output, IXMLReader xmlReader) { tag = tag.ToUpperInvariant(); if (tag.Equals("LIC", StringComparison.Ordinal)) { _listBuilder.Li(opening, output); return; } if (tag.Equals("OLC", StringComparison.Ordinal) || tag.Equals("ULC", StringComparison.Ordinal)) { if (opening) { _listBuilder = _listBuilder.StartList(tag[0] == 'o', output); } else { _listBuilder = _listBuilder.CloseList(output); } return; } }
public void HandleTag(bool isOpening, string tag, IEditable output, IXMLReader xmlReader) { tag = tag.ToUpperInvariant(); var isItem = tag == TagLi; // Is list item if (isItem) { _listBuilder.AddListItem(isOpening, output); } // Is list else { if (isOpening) { var isOrdered = tag == TagOl; _listBuilder = _listBuilder.StartList(isOrdered, output); } else { _listBuilder = _listBuilder.CloseList(output); } } }