From f85d1a0b999796ee3bb653b8cdf219de14e87542 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 21 Dec 2015 11:40:53 +0900 Subject: [PATCH] Fix #2189: previous sibling link has broken if the file was appeared twice or more --- CHANGES | 1 + sphinx/environment.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 2ffb8c1a8..0b9878189 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ Bugs fixed * #2168: Fix raw directive does not work for text writer * #2171: Fix cannot linkcheck url with unicode * #2182: LaTeX: support image file names with more than 1 dots +* #2189: Fix previous sibling link for first file in subdirectory uses last file, not intended previous from root toctree Release 1.3.3 (released Dec 2, 2015) diff --git a/sphinx/environment.py b/sphinx/environment.py index da92f2e81..ac95a4eb6 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -1958,6 +1958,8 @@ class BuildEnvironment: if docname in parents_set: # we will warn about this in resolve_toctree() return + if docname in relations: + return includes = getinc(docname) # previous if not previous: