diff --git a/CHANGELOG.md b/CHANGELOG.md index de08eca2..c83c8746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.0.8] +* Support token attribute. + ## [1.0.7] * Fix crash on web (dart:io). diff --git a/app/assets/sample_data.json b/app/assets/sample_data.json index 7fe41833..a0b44f50 100644 --- a/app/assets/sample_data.json +++ b/app/assets/sample_data.json @@ -497,6 +497,24 @@ }, "insert": "font size 20" }, + { + "attributes":{ + "token":"built_in" + }, + "insert":" diff" + }, + { + "attributes":{ + "token":"operator" + }, + "insert":"-match" + }, + { + "attributes":{ + "token":"literal" + }, + "insert":"-patch" + }, { "insert": "\n" } diff --git a/app/pubspec.lock b/app/pubspec.lock index 1ac7adf0..a37fd0d0 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -152,7 +152,7 @@ packages: path: ".." relative: true source: path - version: "1.0.7" + version: "1.0.8" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/models/documents/attribute.dart b/lib/models/documents/attribute.dart index 7b363bed..38a6b522 100644 --- a/lib/models/documents/attribute.dart +++ b/lib/models/documents/attribute.dart @@ -34,6 +34,7 @@ class Attribute { Attribute.width.key: Attribute.width, Attribute.height.key: Attribute.height, Attribute.style.key: Attribute.style, + Attribute.token.key: Attribute.token, }; static final BoldAttribute bold = BoldAttribute(); @@ -74,6 +75,8 @@ class Attribute { static final StyleAttribute style = StyleAttribute(null); + static final TokenAttribute token = TokenAttribute(null); + static final Set inlineKeys = { Attribute.bold.key, Attribute.italic.key, @@ -266,3 +269,7 @@ class HeightAttribute extends Attribute { class StyleAttribute extends Attribute { StyleAttribute(String val) : super('style', AttributeScope.IGNORE, val); } + +class TokenAttribute extends Attribute { + TokenAttribute(String val) : super('token', AttributeScope.IGNORE, val); +} diff --git a/pubspec.yaml b/pubspec.yaml index b84de7bc..b79ea315 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: One client and affiliated collaborator of Flutter Quill is Bullet Journal App. -version: 1.0.7 +version: 1.0.8 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill.git