Skip to content

Commit

Permalink
Merge pull request #19 from andreycizov/master
Browse files Browse the repository at this point in the history
We don't support rendering bare .rst files.
  • Loading branch information
quentinus95 authored Sep 19, 2019
2 parents 08ac60b + 6f5d3ed commit 9c8de7b
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 9c8de7b

Please sign in to comment.