Skip to content

Commit f14015c

Browse files
committed
Add ScriptAttribute
1 parent cdd4872 commit f14015c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/src/models/documents/attribute.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Attribute<T> {
3939
Attribute.height.key: Attribute.height,
4040
Attribute.style.key: Attribute.style,
4141
Attribute.token.key: Attribute.token,
42+
Attribute.script.key: Attribute.script,
4243
});
4344

4445
static final BoldAttribute bold = BoldAttribute();
@@ -85,6 +86,8 @@ class Attribute<T> {
8586

8687
static final TokenAttribute token = TokenAttribute('');
8788

89+
static final ScriptAttribute script = ScriptAttribute('');
90+
8891
static final Set<String> inlineKeys = {
8992
Attribute.bold.key,
9093
Attribute.italic.key,
@@ -312,3 +315,8 @@ class StyleAttribute extends Attribute<String?> {
312315
class TokenAttribute extends Attribute<String> {
313316
TokenAttribute(String val) : super('token', AttributeScope.IGNORE, val);
314317
}
318+
319+
// `script` is supposed to be inline attribute but it is not supported yet
320+
class ScriptAttribute extends Attribute<String> {
321+
ScriptAttribute(String val) : super('script', AttributeScope.IGNORE, val);
322+
}

0 commit comments

Comments
 (0)