Changes between Version 2 and Version 3 of TracLinks


Ignore:
Timestamp:
Oct 11, 2012 4:21:21 PM (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v2 v3  
    3030 Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`
    3131 Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk@1:3`, `[2:5/trunk]`
    32  Diffs :: `diff:@1:3`, `diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default`
     32 Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin@9128:9953`,
     33          `diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default`
    3334          or `diff:trunk/trac@3538//sandbox/vc-refactoring@3539`
    3435 Files :: `source:trunk/COPYING`, `source:/trunk/COPYING@200` (at version 200), `source:/trunk/COPYING@200#L25` (at version 200, line 25)
     
    4445 Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk
    4546 Revision log :: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]
    46  Diffs :: diff:@1:3, diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default
     47 Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin@9128:9953,
     48          diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default
    4749          or diff:trunk/trac@3538//sandbox/vc-refactoring@3539
    4850 Files :: source:trunk/COPYING, source:/trunk/COPYING@200 (at version 200), source:/trunk/COPYING@200#L25 (at version 200, line 25)
     
    107109
    108110=== Relative links ===
    109 
    110 To create a link to a specific anchor in a page, use '#':
    111 {{{
    112  [#Relativelinks relative links] or [[#Relativelinks|relative links]]
    113 }}}
    114 Displays:
    115   [#Relativelinks relative links] or [[#Relativelinks|relative links]]
    116 
    117 Hint: when you move your mouse over the title of a section, a '¶' character will be displayed. This is a link to that specific section and you can use this to copy the `#...` part inside a relative link to an anchor.
    118111
    119112To create a link to a [trac:SubWiki SubWiki]-page just use a '/':
     
    148141''(Changed in 0.11)'' Note that in Trac 0.10, using e.g. `[../newticket]`  may have worked for linking to the `/newticket` top-level URL, but since 0.11, such a link will stay in the wiki namespace and therefore link to a sibling page.
    149142See [#Server-relativelinks] for the new syntax.
     143
     144=== Link anchors ===
     145
     146To create a link to a specific anchor in a page, use '#':
     147{{{
     148 [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
     149}}}
     150  [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
     151
     152Hint: when you move your mouse over the title of a section, a '¶' character will be displayed. This is a link to that specific section and you can use this to copy the `#...` part inside a relative link to an anchor.
     153
     154To create a link to the first or last occurrence of a term on a page, use a ''pseudo anchor'' starting with '#/' or '#?':
     155{{{
     156 [#/Milestone first occurrence of Milestone] or
     157 [#?Milestone last occurrence of Milestone]
     158}}}
     159 [#/Milestone first occurrence of Milestone] or
     160 [#?Milestone last occurrence of Milestone]
     161This will also highlight all other matches on the linked page. By default only case sensitive matches are considered. To include case insensitive matches append '/i':
     162{{{
     163 [#/Milestone/i first occurrence of Milestone or milestone] or
     164 [#?Milestone/i last occurrence of Milestone or milestone]
     165}}}
     166 [#/Milestone/i first occurrence of Milestone or milestone] or
     167 [#?Milestone/i last occurrence of Milestone or milestone]
     168
     169''(since Trac 1.0)''
     170
     171Such anchors can be very useful for linking to specific lines in a file in the source browser:
     172{{{
     173 [trac:source:tags/trac-0.12/trac/wiki/api.py#L127 Line 127] or
     174 [trac:source:tags/trac-0.12/trac/ticket/roadmap.py#L47 Line 47]
     175}}}
     176 [trac:source:tags/trac-0.12/trac/wiki/api.py#L127 Line 127] or
     177 [trac:source:tags/trac-0.12/trac/ticket/roadmap.py#L47 Line 47]
     178(Hint: The line numbers displayed in the source browser are links to anchors on the respective lines.)
     179
     180Since such links become outdated when the file changes, it can be useful to link using a '#/' pseudo anchor instead:
     181{{{
     182 [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or
     183 [trac:source:trunk/trac/env.py#/ISystemInfoProvider ISystemInfoProvider]
     184}}}
     185 [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or
     186 [trac:source:trunk/trac/env.py#/ISystemInfoProvider ISystemInfoProvider]
    150187
    151188=== InterWiki links ===
     
    254291 - `ticket:123#comment:description`
    255292
     293=== htdocs: links ===
     294
     295Use `htdocs:path/to/file` to reference files in the `htdocs` directory of the Trac environment, the [TracEnvironment#DirectoryStructure web resource directory].
     296
    256297=== query: links ===
    257298
     
    287328=== wiki: links ===
    288329
    289 See WikiPageNames and [#QuotingspaceinTracLinks quoting space in TracLinks] above.
     330See WikiPageNames and [#QuotingspaceinTracLinks quoting space in TracLinks] above. It is possible to create a link to a specific page revision using the syntax WikiStart@1.
    290331
    291332=== Version Control related links ===