edit/page: keep page named after existing directory
[minimedit.git] / edit / page.js
index 522d63e3c41d5b55f05b987ea5b05c6d7620b2b2..9997e293c7615a3af4c6b29945f56583503a49e5 100644 (file)
@@ -2,7 +2,7 @@ CKEDITOR.plugins.add('inlinesave', {
        init: function(editor) {
                editor.addCommand( 'inlinesave', {
                        exec: function (editor) {
-                               var pagename = window.location.pathname.replace(/\/$/, '/index');
+                               var pagename = window.location.pathname;
                                var body = editor.getData();
                                // empty line is equivalent to a paragraph break
                                body = body.replace(/<br \/>\s*<br \/>/g, '<p>');