revolunet / sublimetext-markdown-preview

markdown preview and build plugin for sublime text 2/3
MIT License
2.31k stars 362 forks source link

Default behaviour should be offline mode #371

Closed ghuser closed 7 years ago

ghuser commented 7 years ago

I believe that it is not good behavior for an editor to send edited file contents over the net by default. No mater what the target site is. At least it should prompt the first time.

facelessuser commented 7 years ago

It lets you choose to use Github or Python Markdown parser. The readme explains that when using the Github parser that it is sent to Github. Due to the nature of the plugin, it should be expected that it will send your content to Github if selecting the Github parser. There may be a difference of opinion here, but I believe before running a plugin, you should look over the documentation to understand what it does.

NOTE: If you choose the GitHub API for conversion (set parser: github in your settings), your code will be sent through https to github for live conversion. You'll have Github flavored markdown, syntax highlighting and EMOJI support for free ❤️ :octocat: 🎁 . If you make more than 60 calls a day, be sure to set your GitHub API key in the settings :). You can also get most of this in the default Markdown parser with by enabling certain extensions; see "Parsing Github Flavored Markdown"" below for more information.

facelessuser commented 7 years ago

I came back and re-read my comment, I think the tone is not as I intended. Hopefully it was not taken in a negative light. Apologies if the tone came off bad.

But what I am trying to say is that the use of the Github API is documented. It is encouraged that users read the document before using the plugin. I think that documenting it should be sufficient.

ghuser commented 7 years ago

No worries about the tone. It didn't feel negative. For sure it is good to read the full documentation, before installing anything. It just felt unexpected that by using the default settings, the plugin was sending the edited file. I kind of don't like "no warning-privacy off" defaults. This is of course opinionated and what worries me most is that for so long I'm the only one that raised this "issue". I already feel weirdo! hehe

revolunet commented 7 years ago

Yeah i think we should use offline-API as default too, README has became big and that info is somewhat lost in documentation.

facelessuser commented 7 years ago

@ghuser, after looking through the code and settings, it appears the default is Python Markdown which is the offline parser. Are you seeing something different?

facelessuser commented 7 years ago

Yeah i think we should use offline-API as default too, README has became big and that info is somewhat lost in documentation.

It is possible that this project needs a more formal documentation utilizing the Github pages. There are a lot of little things to know, and even I forget the quirks of certain settings. I think some formal documentation could really help. I've done this on a number of my Sublime plugins.

ghuser commented 7 years ago

Regarding the default settings, I got the github message after 60 times of saving, without having changed any of the defaults. That's how I realized that there is some back-end connection. This seems to contradict with documentation inside the default settings. There might be a code issue there. Is it possible that it falls back to github api usage, if it does not find the required dependencies for the offline api?

facelessuser commented 7 years ago

Sounds like you have live reload enabled. I'd have to take a look at that path of the code.

facelessuser commented 7 years ago

Are you using default settings? If not, can you post them here? MarkdownPreview doesn't invoke conversion on save if using the default settings. Also, maybe you could post a list of your currently installed plugins. Something doesn't sound right with your setup.

facelessuser commented 7 years ago

@ghuser please do remember to respond, or I won't be able to look at this issue any further.

facelessuser commented 7 years ago

Alright, I tried. I'm going to move on from looking into to this as there has been no response.

facelessuser commented 7 years ago

As there has been no response on this issue for a long time, I will close this until someone can give me more information, or I can witness this behavior myself. I'll do some testing before the next release to make sure.

ghuser commented 7 years ago

"..by using the default settings".

facelessuser commented 7 years ago

I saw that, but what you describe does not match what you are saying is occurring. My point is that in recent versions auto-reload is disabled by default. So when you say: I got the github message after 60 times of saving, without having changed any of the defaults. it makes no sense as Markdown Preview does nothing on save unless enable_autoreload is enabled.

It shouldn't be doing anything. But it seems enable_autoreload is enabled for you, which is not the default settings. So, it seems you are not running with default settings.

facelessuser commented 7 years ago

With that said, before the next release, I will verify that the settings are processed as expected. If they are not, I will fix that. But if they are, you have a very specific local issue that is not present anywhere else.