Edgewall Software

Changes between Initial Version and Version 1 of 1.2/WikiRestructuredTextLinks


Ignore:
Timestamp:
Oct 15, 2019, 6:33:11 AM (5 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 1.2/WikiRestructuredTextLinks

    v1 v1  
     1= TracLinks in reStructuredText =
     2[[TracGuideToc]]
     3[[TranslatedPages]]
     4
     5This document illustrates how to use the `:trac:` role in [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText]. The page is written like:
     6
     7{{{
     8{{{#!rst
     9Examples:
     10
     11 * Tickets: :trac:`#1` or :trac:`ticket:1`
     12 * Ticket comments: :trac:`comment:ticket:1:2`
     13 * Reports: :trac:`{1}` or :trac:`report:1`
     14 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
     15 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
     16 * Diffs: :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
     17 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
     18 * Milestones: :trac:`milestone:1.0`
     19 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
     20 * Files: :trac:`source:trunk/COPYING`
     21 * A specific file revision: :trac:`source:/trunk/COPYING@200`
     22 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`
     23
     24An explicit label can be specified, separated from the link by a space:
     25
     26 * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
     27}}}
     28}}}
     29
     30Provided you have [http://docutils.sourceforge.net/ docutils] installed, the above block will render as:
     31----
     32{{{#!rst
     33Examples:
     34
     35 * Tickets: :trac:`#1` or :trac:`ticket:1`
     36 * Ticket comments: :trac:`comment:ticket:1:2`
     37 * Reports: :trac:`{1}` or :trac:`report:1`
     38 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
     39 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
     40 * Diffs: :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
     41 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
     42 * Milestones: :trac:`milestone:1.0`
     43 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
     44 * Files: :trac:`source:trunk/COPYING`
     45 * A specific file revision: :trac:`source:/trunk/COPYING@200`
     46 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`
     47
     48An explicit label can be specified, separated from the link by a space:
     49
     50 * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
     51}}}
     52----
     53
     54Note that the above could have been written using substitution references and the `trac::` directive:
     55{{{
     56{{{#!rst
     57See |ticket123|.
     58
     59 .. |ticket123| trac:: ticket:123 this ticket
     60}}}
     61}}}
     62
     63This renders as:
     64----
     65
     66{{{#!rst
     67See |ticket123|.
     68
     69 .. |ticket123| trac:: ticket:123 this ticket
     70}}}
     71
     72----
     73See also: WikiRestructuredText, TracLinks