Exemplo n.º 1
0
 public Item(Element replaceElement, ListingKind listKind)
 {
     this.ExplicitIds = replaceElement.ExplicitIds;
     this.Attributes  = replaceElement.Attributes;
     this.Subs        = replaceElement.Subs;
     this.Labels      = this.Title.Subs.OfType <Tip>().ToList();
     this.Title.Subs  = this.Title.Subs.Except(this.Labels).ToList();
     this.ImplicitId  = replaceElement.ImplicitId;
     this.IsSingle    = replaceElement.IsSingle;
     this.IsCheckitem = listKind == ListingKind.CheckItems;
 }
Exemplo n.º 2
0
 public Listing(ListBlock mdo) : base(mdo)
 {
     if (mdo.IsOrdered)
     {
         this.Kind = ListingKind.Ordered;
     }
     else
     {
         this.Kind = mdo.BulletType switch {
             '+' => ListingKind.CheckItems,
             '-' => ListingKind.Items,
             _ => this.Kind
         }
     };
 }