-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix taxonomy current path #1882
Conversation
0e0fb9b
to
912041b
Compare
@@ -399,6 +399,29 @@ title = "A title" | |||
); | |||
} | |||
|
|||
#[test] | |||
fn does_not_duplicate_lang() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it mean to duplicate lang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's described in #1878.
TL;DR: currenly get_url(path='/lang/something', lang='lang')
will return a URL with duplicated lang
part: /lang//lang/something
context.insert("current_url", &config.make_permalink(&self.kind.name)); | ||
context.insert("current_path", &format!("/{}/", self.kind.name)); | ||
context.insert("current_url", &self.permalink); | ||
context.insert("current_path", &self.path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we already had them eh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we indeed had both permalink
and path
already computed in the new
function, but path
was discarded and permalink
wasn't used. I've made it to match other similar structs e.g., Path
912041b
to
9208a06
Compare
Fixes #1878
Sanity check:
next
branch?