Changes between Version 6 and Version 7 of TracLinks


Ignore:
Timestamp:
Sep 8, 2024, 12:14:12 PM (12 days ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v6 v7  
    142142=== Link anchors
    143143
    144 To create a link to a specific anchor in a page, use `#`:
     144To create a link to a specific anchor in a page, use '#':
    145145{{{
    146146 [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
     
    148148  [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]
    149149
    150 To create an anchor in a page, use `[=#...]`:
    151 {{{
    152  [=#myanchor my anchor] or empty form [=#myanchor]
    153 }}}
    154  [=#myanchor my anchor] or empty form [=#myanchor]
    155 
    156150Hint: when you hover 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.
    157151
    158 To create a link to the first or last occurrence of a term on a page, use a ''pseudo anchor'' starting with `#/` or `#?`:
     152To create a link to the first or last occurrence of a term on a page, use a ''pseudo anchor'' starting with '#/' or '#?':
    159153{{{
    160154 [#/Milestone first occurrence of Milestone] or
     
    163157 [#/Milestone first occurrence of Milestone] or
    164158 [#?Milestone last occurrence of Milestone]
    165 This 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`:
     159This 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':
    166160{{{
    167161 [#/Milestone/i first occurrence of Milestone or milestone] or
     
    182176(Hint: The line numbers displayed in the source browser are links to anchors on the respective lines.)
    183177
    184 Since such links become outdated when the file changes, it can be useful to link using a `#/` pseudo anchor instead:
     178Since such links become outdated when the file changes, it can be useful to link using a '#/' pseudo anchor instead:
    185179{{{
    186180 [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or
     
    275269If you'd like to create a direct link to the content of the attached file instead of a link to the attachment page, simply use `raw-attachment:` instead of `attachment:`.
    276270
    277 This can be useful for pointing directly to an HTML document, for example. Note that for this use case, you'd have to allow the web browser to render the content by setting [[TracIni#attachment-render_unsafe_content-option|"[attachment] render_unsafe_content"]] = `enabled`. Caveat: only do that in environments for which you're 100% confident you can trust the people who are able to attach files, as this opens up your site to [https://en.wikipedia.org/wiki/Cross-site_scripting cross-site scripting] attacks.
     271This can be useful for pointing directly to an HTML document, for example. Note that for this use case, you'd have to allow the web browser to render the content by setting [[TracIni#attachment-render_unsafe_content-option|"[attachment] render_unsafe_content"]] = `enabled`. Caveat: only do that in environments for which you're 100% confident you can trust the people who are able to attach files, as this opens up your site to [wikipedia:Cross-site_scripting cross-site scripting] attacks.
    278272
    279273See also [#export:links].