ogom / sublimetext-markdown-slideshow

Sublime Text 2/3 plugin for markdown slideshow
http://ogom.github.com/sublimetext-markdown-slideshow
93 stars 18 forks source link

Extensions don't work #3

Closed nh2 closed 12 years ago

nh2 commented 12 years ago

Try using a markdown extension, like fenced_code, by using

        html = markdown.markdown(contents, ['fenced_code']) + '\n'

in get_slideshow. It doesn't work: It cannot find the fenced_code module in markdown/__init__.py, in def build_extension(self, ext_name, configs = []). Weirdly, it can find an extensions module, but when I abspath that module's __dir__, it tells me that it lives in my home directory, which certainly does not contain a markdown directory.

Note: You need to put a

logging.basicConfig()

into MarkdownSlideshow.py to see the error.

ogom commented 12 years ago

Hi,

Extended the Fenced Code Blocks and Tables.

html = markdown.markdown(contents, ['fenced_code', 'tables']) + '\n'

Regards, Ogom

nh2 commented 12 years ago

@ogom That was not what I meant - I mean when I do exactly that, I get the described error. Do you not get that error?

ogom commented 12 years ago

Added a local path.

if os.path.join(sublime.packages_path(), 'Markdown Slideshow', 'lib') not in sys.path:
    sys.path.append(os.path.join(sublime.packages_path(), 'Markdown Slideshow', 'lib'))

from markdown import markdown
nh2 commented 12 years ago

Thanks, your recent changes made it work! I had to use #4, though.