Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: filters/stripindex.py

Issue 29332874: Issue 3435 - strip "index" from page path for canonical URL (Closed)
Patch Set: Went with Wladimir suggestion Created Dec. 18, 2015, 11:08 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | templates/default.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 def stripindex(path):
2 parts = path.split("/")
3 if parts[-1] == "index":
4 parts.pop()
5 return "/".join(parts)
OLDNEW
« no previous file with comments | « no previous file | templates/default.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld