diff --git a/lib/models/documents/attribute.dart b/lib/models/documents/attribute.dart index 412d7a9c..cb580103 100644 --- a/lib/models/documents/attribute.dart +++ b/lib/models/documents/attribute.dart @@ -7,7 +7,7 @@ enum AttributeScope { class Attribute { final String key; final AttributeScope scope; - T value; + final T value; Attribute(this.key, this.scope, this.value); } @@ -44,3 +44,21 @@ class HeaderAttribute extends Attribute { // H3 in HTML Attribute get level3 => Attribute(key, scope, 3); } + +class ListAttribute extends Attribute { + ListAttribute(String val) : super('list', AttributeScope.BLOCK, val); + + // "attributes":{"list":"ordered"} + Attribute get ordered => Attribute(key, scope, 'ordered'); + + // "attributes":{"list":"bullet"} + Attribute get bullet => Attribute(key, scope, 'bullet'); +} + +class CodeBlockAttribute extends Attribute { + CodeBlockAttribute() : super('code-block', AttributeScope.BLOCK, null); +} + +class BlockQuoteAttribute extends Attribute { + BlockQuoteAttribute() : super('blockquote', AttributeScope.BLOCK, null); +}