sublimetext-markdown-slideshow icon indicating copy to clipboard operation
sublimetext-markdown-slideshow copied to clipboard

Extension load error

Open ParadiseDS opened this issue 11 years ago • 1 comments

After reviewing the loading extension code I thought the extension syntax in setting files is extensions: ['tables', 'fenced_code'] But when I write the setting into User-settings, ST3 alert me that it expects value in the bracket, which means it cannot parse content in ' as a value. I just ignore it and run the command, but the extension seems not to work in the slide. I didn't know whether ST3 pass the extension parameters to the package or not or there's other issues making extension not work.

ParadiseDS avatar Oct 11 '15 06:10 ParadiseDS

Claude reports: I can reproduce this on Sublime Text build 4200 (Windows, package version 2015.04.16 from Package Control) and found the cause.

With "extensions": ["tables"] in the user settings, Markdown Slideshow fails with:

File ".../lib/markdown/__init__.py", line 244, in build_extension
    module = importlib.import_module(module_name_old_style)
ImportError: No module named 'mdx_tables'

build_extension tries tables, then markdown.extensions.tables, then mdx_tables. The bundled Python-Markdown 2.5.2 lives in the package's own lib/markdown folder and is imported relatively, so markdown is not a top-level module and all three imports fail, although lib/markdown/extensions/tables.py exists. Short names (tables, fenced_code, extra) therefore never work.

Giving the full dotted path of the bundled module works: "extensions": ["Markdown Slideshow.lib.markdown.extensions.tables"] produced <table>, <thead> and <th>a</th> for a markdown table in the generated slide.html (the README suggests the short names). Without extensions, plain markdown slides are generated correctly.

dpc00 avatar Oct 19 '26 21:10 dpc00