public ListBuilder(int listIndent) // KWI-FIX: added listIndent { _listIndent = listIndent; _parent = null; _gap = 0; _liGap = GetLiGap(null); }
private ListBuilder(ListBuilder parent, bool ordered) { _parent = parent; _liGap = parent._liGap; _gap = parent._gap + _listIndent + _liGap.GetGap(ordered); _liIndex = ordered ? 0 : -1; }
private ListBuilder(ListBuilder parent, bool ordered, int listIndent) // KWI-FIX: added listIndent { _listIndent = listIndent; _parent = parent; _liGap = parent._liGap; _gap = parent._gap + _listIndent + _liGap.GetGap(ordered); _liIndex = ordered ? 0 : -1; }
internal ListBuilder(LiGap liGap) { _parent = null; _gap = 0; if (liGap != null) { _liGap = liGap; } else { _liGap = GetLiGap(null); } }
public ListBuilder CloseList(IEditable output) { EnsureParagraphBoundary(output); ListBuilder result = _parent; if (result == null) { result = this; } if (result._parent == null) { _ = output.Append('\n'); } return result; }
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); } } }
public ListBuilder() { _parent = null; _gap = 0; _liGap = GetLiGap(null); }
private ListBuilder _listBuilder; // KWI-FIX: removed new, set in constructor public ListTagHandler(int listIndent) // KWI-FIX: added constructor with listIndent property { _listBuilder = new ListBuilder(listIndent); }