#1430 closed defect (invalid)
Code Colouring Not Applied For Revision
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | version control/browser | Version: | devel |
Severity: | minor | Keywords: | colourize code links |
Cc: | chris@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm not sure if this is a feature or not but when I clicked on the previous revision of my source code it failed to colourize the code. Here is what I was able to deduce:
/trac/file/trunk/helloworld.c ⇐= Colourized /trac/file/trunk/helloworld.c/?rev=3 ⇐= Not Colourized
But helloworld.c?rev=3 is, notice no slash after the filename in the URL.
I don't know how I got a link with a slash in it - the revision log seems to use the slash after the file - but this took me to the non-colorized version.
Chris
Attachments (2)
Change History (6)
by , 20 years ago
Attachment: | Browser_get_path_links.patch added |
---|
comment:1 by , 20 years ago
Cc: | added |
---|---|
Keywords: | links added |
I have narrowed down the problem to be with how the links are generated for the browser.
The loop was initalized with a / and then trailing slashes were added. So I simply started with a blank string and added the slash first in the loop.
I have no way to test this patch I have attached since I do not have the development version of trac running, just the stable release.
Please test and let me know if it works.
by , 20 years ago
Attachment: | Browser_get_path_links1.patch added |
---|
A silly mistake, trying to fix the egg on my face. This should work better.
comment:2 by , 20 years ago
Milestone: | → 0.9 |
---|---|
Version: | 0.8.1 → devel |
Ah! I should set up a devel Trac before I make more stupid mistakes. Instead of having a string of slashes at the beginning, this should work a little better.
for i,part in util.enum(parts): - path = path + part + '/' + path = path + '/' + part links.append({
comment:3 by , 20 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Works as of [1516] which was the HEAD revision at the time of posting. Ignore an overzealous new user who just got HEAD to build. :)
comment:4 by , 19 years ago
Milestone: | 0.9 |
---|
Patch to stop slashes from being appended to the links. This is breaking syntax highlighting.