File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
lib/src/rmui_bundle_update_suggestors Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,10 @@ class Link {
5252 const Link ({required this .pathSubpattern});
5353
5454 /// A pattern for finding a link tag with a matching path.
55- RegExp get pattern => RegExp (r'<link[^>]*href="(?<path_prefix>[^"]*)' +
56- pathSubpattern +
57- r'"[^>]*>(?<trailing_new_line>\n?)' );
55+ RegExp get pattern => RegExp (
56+ r'(?<preceding_whitespace>[^\S\r\n]*)<link[^>]*href="(?<path_prefix>[^"]*)' +
57+ pathSubpattern +
58+ r'"[^>]*>(?<trailing_new_line>\n?)' );
5859
5960 @override
6061 String toString () =>
Original file line number Diff line number Diff line change @@ -80,10 +80,10 @@ void main() {
8080 expectedOutput: d.dir ('project' , [
8181 d.file ('dev.html' , /*language=html*/ '''
8282<link href="packages/react/js/react.dev.js">
83- ''' ),
83+ ''' ),
8484 d.file ('dev_with_addons.html' , /*language=html*/ '''
8585<link href="packages/react/js/react.dev.js">
86- ''' ),
86+ ''' ),
8787 ]),
8888 args: ['--yes-to-all' ]);
8989
@@ -100,10 +100,10 @@ void main() {
100100 expectedOutput: d.dir ('project' , [
101101 d.file ('prod.html' , /*language=html*/ '''
102102<link href="packages/react/js/react.min.js">
103- ''' ),
103+ ''' ),
104104 d.file ('prod_with_addons.html' , /*language=html*/ '''
105105<link href="packages/react/js/react.min.js">
106- ''' )
106+ ''' )
107107 ]),
108108 args: ['--yes-to-all' ]);
109109 });
You can’t perform that action at this time.
0 commit comments