File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 0.3.0] - 11th Apr 2021
2
+ - Update matrix: URI schemes
3
+ - Fix small rendering bug with flutter 2
4
+ - Update dependencies
5
+
1
6
## [ 0.2.0] - 10th Jan 2021
2
7
- Add support for matrix: URI scheme
3
8
- Add support for ` animated ` URL parameter of mxc URLs
Original file line number Diff line number Diff line change @@ -632,9 +632,12 @@ class HtmlRichTextParser extends StatelessWidget {
632
632
else if (parseContext.parentElement is TextSpan ||
633
633
parseContext.parentElement is LinkTextSpan ) {
634
634
String lastString = parseContext.parentElement.text ?? '' ;
635
- if (! parseContext.parentElement.children.isEmpty &&
636
- parseContext.parentElement.children.last is TextSpan ) {
637
- lastString = parseContext.parentElement.children.last.text ?? '' ;
635
+ if (! parseContext.parentElement.children.isEmpty) {
636
+ if (parseContext.parentElement.children.last is TextSpan ) {
637
+ lastString = parseContext.parentElement.children.last.text ?? '' ;
638
+ } else {
639
+ lastString = '' ;
640
+ }
638
641
}
639
642
if (lastString.endsWith (' ' ) || lastString.endsWith ('\n ' )) {
640
643
finalText = finalText.trimLeft ();
@@ -892,15 +895,14 @@ class HtmlRichTextParser extends StatelessWidget {
892
895
null ;
893
896
} else {
894
897
final match =
895
- RegExp (r"^matrix:(room|group| roomid|user )\/([^\/]+)$" )
898
+ RegExp (r"^matrix:(r| roomid|u )\/([^\/]+)$" )
896
899
.firstMatch (urlLower.split ('?' ).first.split ('#' ).first);
897
900
isPill = match != null ;
898
901
if (isPill) {
899
902
identifier = {
900
- 'room' : '#' ,
901
- 'group' : '+' ,
903
+ 'r' : '#' ,
902
904
'roomid' : '!' ,
903
- 'user ' : '@' ,
905
+ 'u ' : '@' ,
904
906
}[match.group (1 )] +
905
907
match.group (2 );
906
908
}
Original file line number Diff line number Diff line change 1
1
name : flutter_matrix_html
2
2
description : A Flutter widget for rendering static matrix html tags as Flutter widgets. (Will render over 70 different html tags!)
3
- version : 0.2 .0
3
+ version : 0.3 .0
4
4
homepage : https://github.com/Sorunome/flutter_matrix_html
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments