revolunet / sublimetext-markdown-preview

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

Adding the enabled_extensions option to the user settings breaks the plug-in #170

Closed david-lennox closed 10 years ago

david-lennox commented 10 years ago

Using Windows 8, ST3, the plug-in works well until I try to add the enable_extensions option. Even just cutting and pasting the array from the default values provided.

Once I add the option nothing works. When I try to build I get the message Compiling someFilePath... which just hangs.

Here is my user setting object.

{
    "browser": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",

    "enabled_extensions": ["footnotes", "toc", "fenced-code-blocks", "cuddled-lists" ]
}
revolunet commented 10 years ago

Thanks for reporting, could you please paste what you have in Sublime console when this happens ? (menu view->show console)

david-lennox commented 10 years ago

Here is the console output:

Traceback (most recent call last):
  File "markdown in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 211, in build_extension
  File "X/importlib/__init__.py", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1522, in _find_and_load_unlocked
ImportError: No module named 'Markdown Preview.markdown.extensions.fenced-code-blocks'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "MarkdownPreview in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 439, in run
  File "MarkdownPreview in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 394, in run
  File "MarkdownPreview in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 375, in convert_markdown
  File "markdown in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 426, in markdown
  File "markdown in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 146, in __init__
  File "markdown in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 171, in registerExtensions
  File "markdown in C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\Markdown Preview.sublime-package", line 217, in build_extension
ImportError: No module named 'mdx_fenced-code-blocks'

Sorry, accidentally pressed the close and comment button.

facelessuser commented 10 years ago

This looks like an issue of trying load markdown2 extensions while using the markdown parser (markdown2 does not mean a later version of markdown; they are different parsers).

So this is not really a bug, but more a user error...with that said, the plugin should not just be crashing because it can't find extensions. That part will be fixed soon.

This will be handled in #209. I will close this issue in favor of 209. Any further discussion should be carried out there.