Skip to content

Commit

Permalink
Fixed how the next and previous tags were failing within drafts.
Browse files Browse the repository at this point in the history
  • Loading branch information
lethain committed Jul 8, 2008
1 parent 5c0314d commit 286e51a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions markdown/mdx_lifeflow.py
Expand Up @@ -52,18 +52,20 @@ def project(entry, str, slug):

# [remember my previous entry?][previous]
def previous(entry, str):
prev = entry.get_previous_article()
if prev is None:
return None
return str % prev.get_absolute_url()
if entry.__class__.__name__ == "Entry":
prev = entry.get_previous_article()
if prev is None:
return None
return str % prev.get_absolute_url()


# [Update: I clarified this in the next entry!][next]
def next(entry, str):
nxt = entry.get_next_article()
if nxt is None:
return None
return str % nxt.get_absolute_url()
if entry.__class__.__name__ == "Entry":
nxt = entry.get_next_article()
if nxt is None:
return None
return str % nxt.get_absolute_url()


# [Check out the first entry in this series][series 1]
Expand Down

0 comments on commit 286e51a

Please sign in to comment.