1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #2605 resolved

line numbers in multiple preformatted blocks always link to the first (BB-1436)

Will Elwood
created an issue

If a wiki page contains several preformatted blocks, the line numbers all link to the first appearance of that line number on the page.

In other words, it's not possible to link to a specific line number in anything other than the first block (assuming it's longer than all other blocks on the page).

To reproduce, preview the following on any wiki page and click the second line number: {{{ {{{

!ini

test=123 }}} test {{{

!ini

test=456 }}} }}}

Seems to be a case of just generating link names with a number for each block (eg cl-1-1, cl-2-1).

Comments (4)

  1. Jonathan Fine

    I've noticed this problem also. To fix, and retain backwards compatibility for existing URLs/link to code lines, add a block number component to the IDs for all but the first block.

  2. Robert Schmertz

    Or continually increment the count throughout the page.

    Note: if lines of code or added or deleted, existing links to code lines are broken, so I would hope people aren't relying on those too much.

  3. Log in to comment