tbfisher / sublimetext-Pandoc

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.
MIT License
137 stars 26 forks source link

Error outputting HTML 5 after 467e8ae #82

Closed bryanlammon closed 1 year ago

bryanlammon commented 1 year ago

The recent update (467e8ae) broke HTML 5 output for me. When I invoke the Pandoc command and select HTML 5, I get the following error in the console:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1488, in run_
    return self.run(edit, **args)
  File "/Users/[username]/Library/Application Support/Sublime Text/Packages/Pandoc/Pandoc.py", line 165, in run
    if oformat is not None and oformat in _s('pandoc-format-file'):
  File "/Users/[username]/Library/Application Support/Sublime Text/Packages/Pandoc/Pandoc.py", line 275, in _s
    return merge_user_settings()[key]
KeyError: 'pandoc-format-file'

Manually installing the plugin, setting ignore_vcs_packages to true, and reverting to the previous commit (6c099a2) solved the issue.

workergnome commented 1 year ago

Confirming I'm seeing similar issues when trying to convert to PDF after the update.

Also, the default settings appear to be completely missing.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1488, in run_
    return self.run(edit, **args)
  File "/Users/[username]/Library/Application Support/Sublime Text 3/Installed Packages/Pandoc.sublime-package/Pandoc.py", line 165, in run
  File "/Users/[username]/Library/Application Support/Sublime Text 3/Installed Packages/Pandoc.sublime-package/Pandoc.py", line 275, in _s
KeyError: 'pandoc-format-file'

Screenshot 2023-05-30 at 7 07 28 PM

MPvHarmelen commented 1 year ago

Sorry for breaking your set-ups. I reverted to mentioned commit (but not the one before it). Let met know if that fixes your problems!

bryanlammon commented 1 year ago

Reverting to the last commit didn't fix things for me, so I've been trying to track down the problem and think I found it.

It looks like commit 16631fc renamed Pandoc.sublime-settings to atx-headers-arg-update (and made one change to the file). I'm guessing the lack of a sublime-settings file was causing the error.

Renaming atx-headers-arg-update to Pandoc.sublime-settings seems to fix things on the pre-467e8ae version. I haven't tested it with the build-system additions from that commit.

MPvHarmelen commented 1 year ago

Thanks! I don't know why I didn't notice that file rename before accepting the other pull request :thinking: It should be fixed now!