Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit ed16d82

Browse files
chalinkwalrath
authored andcommitted
chore(dart/_util-fns): make adjustTsExamplePath4Dart idempotent (#1515)
Fixes #1513.
1 parent 551ac6d commit ed16d82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/docs/dart/latest/_util-fns.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mixin liveExampleLink2(linkText, exampleUrlPartName)
3737
- // Adjust the folder path, e.g., ts -> dart
3838
- folder = folder.replace(/(^|\/)ts($|\/)/, '$1dart$2').replace(/(^|\/)app($|\/)/, inWebFolder ? '$1web$2' : '$1lib$2');
3939
- // Special case not handled above: e.g., index.html -> web/index.html
40-
- if(baseNameNoExt.match(/^(index|styles)(\.\d)?$/)) folder = (folder ? folder + '/' : '') + 'web';
40+
- if(baseNameNoExt.match(/^(index|styles)(\.\d)?$/) && !folder.match(/web$/)) folder = (folder ? folder + '/' : '') + 'web';
4141
- // In file name, replace special characters with underscore
4242
- baseNameNoExt = baseNameNoExt.replace(/[\-\.]/g, '_');
4343
- // Adjust the file extension

0 commit comments

Comments
 (0)