Skip to content

Commit

Permalink
We don't support rendering bare .rst files.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreycizov committed Sep 16, 2019
1 parent cbab02c commit 6f5d3ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/sphinx-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
this.openBrowser();
});
} else {
atom.notifications.addWarning('Active file must have reStructuredText extension (.rst)');
atom.notifications.addWarning('Active file must have reStructuredText extension (.rst) and must be opened as part of a Project Folder');
}
},

Expand Down Expand Up @@ -218,6 +218,10 @@ export default {
},

isActiveFileRst() {
if(!this.getCurrProjectPath()) {
return false;
}

const editor = atom.workspace.getActivePaneItem();
if (!editor || !editor.buffer) return false;
const activeFilePath = editor.buffer.file.path;
Expand Down

0 comments on commit 6f5d3ed

Please sign in to comment.