wiki:WikiRestructuredTextLinks

Version 1 (modified by trac, 8 years ago) (diff)

--

TracLinks in reStructuredText

This document is for testing the ..trac:: directive. The page is written like

{{{
#!rst 

Examples
...
...

}}}

This is a list of example uses of the trac directive, providing use of TracLinks in WikiRestructuredText.

Examples

trac role

Syntax is `link`:trac: or :trac:`link`, and could be put anywhere in the text. 'link' has the same format as explain for the .. trac:: directive below.

In the middle of my text `WikiFormatting`:trac: see!!!!
In the middle of my text WikiFormatting see!!!!

or

In the middle of my text :trac:`WikiFormatting` see!!!!
In the middle of my text WikiFormatting see!!!!

wiki

.. trac:: WikiFormatting
WikiFormatting
.. trac:: wiki:WikiFormatting
wiki:WikiFormatting
.. trac:: wiki:WikiFormatting WikiFormatting
WikiFormatting
.. trac:: wiki:WikiFormatting LinkText
LinkText

tickets

.. trac:: #1
#1
.. trac:: #1 ticket one
ticket one
.. trac:: ticket:1
ticket:1
.. trac:: ticket:1 ticket one
ticket one

reports

.. trac:: {1}
{1}
.. trac:: {1} report one
report one
.. trac:: report:1
report:1
.. trac:: report:1 report one
report one

changesets

.. trac:: [42]
[42]
.. trac:: [42] changeset 42
changeset 42
.. trac:: changeset:42
changeset:42
.. trac:: changeset:42 changeset 42
changeset 42
.. trac:: foo
foo

files

.. trac:: browser:/trunk/trac
browser:/trunk/trac

The leading / can be omitted...

.. trac:: repos:trunk/trac trunk/trac
trunk/trac
.. trac:: source:trunk/trac Trac source code
Trac source code
.. trac:: browser:trunk/README
browser:trunk/README
.. trac:: repos:trunk/README trunk/README
trunk/README
.. trac:: source:trunk/README README in trunk
README in trunk

Note that if hoo is a file, the link targets its revision log. In order to see the file's content, you need to specify the revision explicitely, like here:

.. trac:: browser:/trunk/README#latest latest of trunk/README
latest of trunk/README
.. trac:: repos:trunk/README#42 trunk/README in rev 42
trunk/README in rev 42

See also: WikiRestructuredTextLinks, TracLinks