File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
app/lib/frontend/handlers Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,13 @@ DocFilePath? parseRequestUri(Uri uri) {
143143 return DocFilePath (package, version, path);
144144}
145145
146+ const _nonExpandedExtensions = {
147+ '.html' ,
148+ '.json' ,
149+ '.gz' ,
150+ '.png' ,
151+ '.svg' ,
152+ };
146153// NOTE: This is a best-effort detection on the segments.
147154// Instead, we should rather check if the file (or the updated path)
148155// is in the generated output, and base the decision on the file list.
@@ -159,7 +166,7 @@ bool _expandToIndexHtml(List<String> segments) {
159166 return false ;
160167 }
161168 final ext = p.extension (segments.last);
162- return ext != '.html' ;
169+ return ! _nonExpandedExtensions. contains (ext) ;
163170}
164171
165172bool _isValidVersion (String version) {
You can’t perform that action at this time.
0 commit comments