Permalink
Browse files

Fixes to includes-file search and config-file creation.

Major errors in the file-search and config-creation code have been
fixed. The package should now work from a fresh installation.
  • Loading branch information...
1 parent 31cddae commit cc74b181c48f3c4493ceff8d533337f64cd59999 Daniel Shannon committed Dec 27, 2012
Showing with 16 additions and 2 deletions.
  1. +3 −0 README.mdown
  2. +11 −0 messages/1.2.0.txt
  3. +1 −1 pandownBuildCommand.py
  4. +1 −1 pandownTouchProjectConfigCommand.py
View
@@ -1,5 +1,8 @@
# [Pandown Plugin for Sublime Text 2][pandown]
+## Updates
+Thanks to Kyle L.'s diligence, I managed to catch a few silly bugs that I'd missed. The package should now perform much better than it did before---which is to say, the package should now perform.
+
## Introduction
This package is designed as a complete, versatile, and highly Subliminal [Sublime Text 2](http://sublimetext.com/) build wrapper for [Pandoc][]. Written by [Daniel Shannon][pandown] and inspired by jclement's [Pandoc (Markdown)](https://github.com/jclement/SublimePandoc) plugin, Pandown is intended to be simple and understandable out of the box but highly customizable behind the scenes. All Pandoc options are configurable, and all input and output formats are theoretically supported, with [Markdown][] implemented most completely.
View
@@ -0,0 +1,11 @@
+ Pandown Plugin for Sublime Text 2
+------------------------------------------------
+ Version 1.2.0
+
+BUG FIXES
+ * The functions that checked for includes files
+ were previously severely crippled, as was the
+ function that generated a configuration file.
+ Both have been fixed in this latest build.
+ Apologies for the inconvenience and what I
+ imagine was more than a little ajada.
View
@@ -246,7 +246,7 @@ def _walkIncludes(self, lookFor, prepend=None):
checkDIR = os.path.abspath(os.path.join(checkDIR, os.path.pardir))
# Are there no paths to check?
- if self.includes_paths_len == 0:
+ if self.includes_paths_len == 0 and lookFor != "pandoc-config.json":
debug("No includes paths to check. Returning the input for Pandoc to handle.")
return prepend + lookFor if prepend else lookFor
# Is the file in the includes_paths?
@@ -6,7 +6,7 @@
class pandownTouchProjectConfigCommand(sublime_plugin.WindowCommand):
def run(self):
- if self.view.file_name():
+ if self.window.active_view().file_name():
configFile = os.path.join(os.path.dirname(self.window.active_view().file_name()), 'pandoc-config.json')
else:
sublime.status_message("Cannot create project configuration for unsaved files.")

0 comments on commit cc74b18

Please sign in to comment.