Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
Removed platform-dependent regexp in Page#build_meta().
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Sep 19, 2012
1 parent 603bd6d commit a5fcdf8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions wok/page.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -285,11 +285,9 @@ def build_meta(self):
logging.debug('current page: ' + repr(parts['page'])) logging.debug('current page: ' + repr(parts['page']))


# Pull extensions from the template's real file name. # Pull extensions from the template's real file name.
match = re.match('.*/[^\.]*\.(.*)$', self.template.filename) parts['ext'] = os.path.splitext(self.template.filename)[1]
if match: if parts['ext']:
parts['ext'] = match.groups()[0] parts['ext'] = parts['ext'][1:] # remove leading dot
else:
parts['ext'] = ''
# Deprecated # Deprecated
parts['type'] = parts['ext'] parts['type'] = parts['ext']
self.meta['ext'] = parts['ext'] self.meta['ext'] = parts['ext']
Expand Down

0 comments on commit a5fcdf8

Please sign in to comment.