Commits

cmlenz  committed 0db9c19

Use `#L220` syntax instead of `#220` to link to line 220 of a file. Completes the fix for #2100.

  • Participants
  • Parent commits 35f8627
  • Branches trunk
  • Tags trac-0.9b2

Comments (0)

Files changed (3)

  * Fixed bugs: #2008, #2032, #2034, #1801, #1893, #1040, #2040,
    #1036, #1944, #1081, #1863, #2052, #2066, #2016, #2090, #1985,
    #2012, #2089, #2079, #1999, #2029, #2079, #1960, #2080, #2021,
-   #2042, #2088, #1345, #2011, #2100, #2103, #2113, #2116
+   #2042, #2088, #1345, #2011, #2100, #2103, #2113, #2116, #2109
 
 
 Trac 0.9-beta1  (Sept 5, 2005)

File trac/versioncontrol/web_ui/util.py

         })
     return links
 
-rev_re = re.compile(r"([^@#]*)[@#]([^#]+)(?:#(\d+))?")
+rev_re = re.compile(r"([^@#]*)[@#]([^#]+)(?:#L(\d+))?")
 
 def get_path_rev_line(path):
     rev = None

File trac/wiki/tests/wiki-tests.txt

 source:/foo%2520bar/baz%252Bquux#42
 source:#42
 source:@42
-source:/foo/bar@42#20
-source:/foo/bar@head#20
+source:/foo/bar@42#L20
+source:/foo/bar@head#L20
 ------------------------------
 <p>
 <a class="source" href="/browser/foo/bar">source:/foo/bar</a>
 <a class="source" href="/browser/foo%2520bar/baz%252Bquux?rev=42">source:/foo%20bar/baz%2Bquux#42</a>
 <a class="source" href="/browser/?rev=42">source:#42</a>
 <a class="source" href="/browser/?rev=42">source:@42</a>
-<a class="source" href="/browser/foo/bar?rev=42#L20">source:/foo/bar@42#20</a>
-<a class="source" href="/browser/foo/bar?rev=head#L20">source:/foo/bar@head#20</a>
+<a class="source" href="/browser/foo/bar?rev=42#L20">source:/foo/bar@42#L20</a>
+<a class="source" href="/browser/foo/bar?rev=head#L20">source:/foo/bar@head#L20</a>
 </p>
 ==============================
 query:?order=priority