Skip to content

Commit

Permalink
add simple support for %root_path% substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
okay committed Dec 15, 2016
1 parent d960f37 commit 8645883
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/vimwiki_markdown/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def get_template_contents

def fixtags(template)
@template = template.gsub('%title%',title).gsub('%pygments%',pygments_wrapped_in_tags)
@template = @template.gsub('%root_path%', root_path)
end

def pygments_wrapped_in_tags
Expand All @@ -34,6 +35,10 @@ def pygments_wrapped_in_tags
</style>"
end

def root_path
options.root_path
end

def title
options.title
end
Expand Down
2 changes: 1 addition & 1 deletion lib/vimwiki_markdown/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module VimwikiMarkdown
VERSION = "0.2.0"
VERSION = "0.2.1"
end

0 comments on commit 8645883

Please sign in to comment.