|
|
|
@ -79,6 +79,8 @@ class Attribute<T> { |
|
|
|
|
|
|
|
|
|
static final BlockQuoteAttribute blockQuote = BlockQuoteAttribute(); |
|
|
|
|
|
|
|
|
|
static final DirectionAttribute direction = DirectionAttribute(null); |
|
|
|
|
|
|
|
|
|
static final WidthAttribute width = WidthAttribute(null); |
|
|
|
|
|
|
|
|
|
static final HeightAttribute height = HeightAttribute(null); |
|
|
|
@ -116,6 +118,7 @@ class Attribute<T> { |
|
|
|
|
Attribute.codeBlock.key, |
|
|
|
|
Attribute.blockQuote.key, |
|
|
|
|
Attribute.indent.key, |
|
|
|
|
Attribute.direction.key, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
static final Set<String> blockKeysExceptHeader = LinkedHashSet.of({ |
|
|
|
@ -124,6 +127,7 @@ class Attribute<T> { |
|
|
|
|
Attribute.codeBlock.key, |
|
|
|
|
Attribute.blockQuote.key, |
|
|
|
|
Attribute.indent.key, |
|
|
|
|
Attribute.direction.key, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
static final Set<String> exclusiveBlockKeys = LinkedHashSet.of({ |
|
|
|
@ -163,6 +167,9 @@ class Attribute<T> { |
|
|
|
|
// "attributes":{"list":"unchecked"} |
|
|
|
|
static Attribute<String?> get unchecked => ListAttribute('unchecked'); |
|
|
|
|
|
|
|
|
|
// "attributes":{"direction":"rtl"} |
|
|
|
|
static Attribute<String?> get rtl => DirectionAttribute('rtl'); |
|
|
|
|
|
|
|
|
|
// "attributes":{"indent":1"} |
|
|
|
|
static Attribute<int?> get indentL1 => IndentAttribute(level: 1); |
|
|
|
|
|
|
|
|
@ -309,6 +316,11 @@ class BlockQuoteAttribute extends Attribute<bool> { |
|
|
|
|
BlockQuoteAttribute() : super('blockquote', AttributeScope.BLOCK, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class DirectionAttribute extends Attribute<String?> { |
|
|
|
|
DirectionAttribute(String? val) |
|
|
|
|
: super('direction', AttributeScope.BLOCK, val); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class WidthAttribute extends Attribute<String?> { |
|
|
|
|
WidthAttribute(String? val) : super('width', AttributeScope.IGNORE, val); |
|
|
|
|
} |
|
|
|
|