@@ -100,7 +100,7 @@ $.save = function( commitMessage ) {
|
||||
var newLocation = baseUrl;
|
||||
|
||||
function clean( str ) {
|
||||
return str.replace(/^\/+/g, '/');
|
||||
return str.replace(/^\/+/, '/');
|
||||
}
|
||||
|
||||
// 'a%2Fb' => a/b
|
||||
@@ -344,7 +344,8 @@ var applyTimeout = function () {
|
||||
if ( !~location.host.indexOf('github.com') ) {
|
||||
jQuery.ajax( {
|
||||
type: 'GET',
|
||||
url: baseUrl + '/data/' + $.key( 'page' ),
|
||||
// ensure leading / is removed from path
|
||||
url: baseUrl + '/data/' + $.key( 'path' ).replace(/^\/+/, '') + $.key( 'page' ),
|
||||
success: function( data ) {
|
||||
editorSession.setValue( data );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user