File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,15 @@ def run(self):
9494 domain = self .env .get_domain ('redirect_from' )
9595 current_doc = self .env .path2doc (self .state .document .current_source )
9696 redirected_reldoc , _ = self .env .relfn2path (redirected_doc , current_doc )
97- if (redirected_reldoc in domain .redirects
98- and domain .redirects [redirected_reldoc ] != current_doc ):
97+ if (
98+ redirected_reldoc in domain .redirects
99+ and domain .redirects [redirected_reldoc ] != current_doc
100+ ):
99101 raise ValueError (
100102 f"{ redirected_reldoc } is already noted as redirecting to "
101- f"{ domain .redirects [redirected_reldoc ]} " )
103+ f"{ domain .redirects [redirected_reldoc ]} \n "
104+ f"Cannot also redirect it to { current_doc } "
105+ )
102106 domain .redirects [redirected_reldoc ] = current_doc
103107 return []
104108
You can’t perform that action at this time.
0 commit comments