diff options
| author | Igor Minar | 2012-10-31 12:56:55 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-10-31 13:03:50 -0700 | 
| commit | 090e5426ac3ed48470dea07df9950bdac4c03384 (patch) | |
| tree | 28c12df098ae3c6a12596e17088a6626fab55538 /docs/src/templates/js/docs.js | |
| parent | 7c67b2fb6afbc18f3593c64a5f339f04f9003f3c (diff) | |
| download | angular.js-090e5426ac3ed48470dea07df9950bdac4c03384.tar.bz2 | |
fix(docs): correctly generate filenames for plunkr/fiddle
previously examples like $http where broken because we would strip part of the
filename (http-hello.html -> http)
we really want to strip only the id suffix that we append to disambiguate
common filenames (like index.html) which appear in many examples.
Diffstat (limited to 'docs/src/templates/js/docs.js')
| -rw-r--r-- | docs/src/templates/js/docs.js | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js index 58be9df9..387c01e2 100644 --- a/docs/src/templates/js/docs.js +++ b/docs/src/templates/js/docs.js @@ -63,7 +63,8 @@ docsApp.directive.sourceEdit = function(getEmbeddedTemplate) {    function read(text) {      var files = [];      angular.forEach(text ? text.split(' ') : [], function(refId) { -      files.push({name: refId.split('-')[0], content: getEmbeddedTemplate(refId)}); +      // refId is index.html-343, so we need to strip the unique ID when exporting the name +      files.push({name: refId.replace(/-\d+$/, ''), content: getEmbeddedTemplate(refId)});      });      return files;    } | 
