File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1049,13 +1049,12 @@ class Scanner {
10491049 /// [flowSeparators] indicates whether the tag URI can contain flow
10501050 /// separators.
10511051 String _scanTagUri ({String ? head, bool flowSeparators = true }) {
1052- var length = head == null ? 0 : head.length;
1053- var buffer = StringBuffer ();
1052+ final buffer = StringBuffer ();
10541053
10551054 // Copy the head if needed.
10561055 //
10571056 // Note that we don't copy the leading '!' character.
1058- if (length > 1 ) buffer.write (head! .substring (1 ));
1057+ if ((head ? . length ?? 0 ) > 1 ) buffer.write (head! .substring (1 ));
10591058
10601059 // The set of characters that may appear in URI is as follows:
10611060 //
@@ -1075,7 +1074,7 @@ class Scanner {
10751074 }
10761075
10771076 // libyaml manually decodes the URL, but we don't have to do that.
1078- return Uri .decodeFull (_scanner.substring (start));
1077+ return buffer. toString () + Uri .decodeFull (_scanner.substring (start));
10791078 }
10801079
10811080 /// Scans a block scalar.
You can’t perform that action at this time.
0 commit comments