Browse Source

Issue #114: Added support for relative path in stylus imports

main
Lakshmi Vyasarajan 13 years ago
parent
commit
d009400434
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      hyde/ext/plugins/stylus.py

+ 2
- 1
hyde/ext/plugins/stylus.py View File

@@ -46,9 +46,10 @@ class StylusPlugin(CLTransformer):
if not match.lastindex: if not match.lastindex:
return '' return ''
path = match.groups(1)[0] path = match.groups(1)[0]
afile = File(resource.source_file.parent.child(path))
afile = File(File(resource.source_file.parent.child(path)).fully_expanded_path)
if len(afile.kind.strip()) == 0: if len(afile.kind.strip()) == 0:
afile = File(afile.path + '.styl') afile = File(afile.path + '.styl')

ref = self.site.content.resource_from_path(afile.path) ref = self.site.content.resource_from_path(afile.path)


if not ref: if not ref:


Loading…
Cancel
Save