プロジェクト

全般

プロフィール

Vote #69740

完了

{{toc}} uses identical anchors for subsections with the same name

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2011/04/20
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
42
issue_org_id:
8194
author_id:
32403
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

If you have a wiki page with the following structure:

  1. Section A 1.1 overview ...
  2. Section B 2.1 overview ...

the {{toc}} macro cannot distinguish between 1.1 and 2.1, since it uses @#overview#@ for both, thus ending up in 1.1

Redmine version: 1.1.2


journals

Anchor name could be preppend with parent title anchor.
--------------------------------------------------------------------------------
Etienne Massip wrote:
> Anchor name could be preppend with parent title anchor.

I would like to +1 this.

And maybe extend the requirement by allowing custom anchor names. Would be most useful in wiki when trying to write a use guide that would produce a "pretty and informative url"

i.e.

!h1. Transaction

..blah blah blah...

!h2. Expense

..blah blah blah...

!h3. Bank

..blah blah blah...

h4![[transaction-expense-bank-bank-fees|Bank Fees]].

To enter a bank fee click...

--------------------------------------------------------------------------------
Etienne Massip wrote:
> Anchor name could be preppend with parent title anchor.

This is not bullet-proof as it wouldn't make unique anchors with the following:
1. Section A
1.1 overview
1.1.1 subsection
...
2. Section B
2.1 overview
2.1.1 subsection

I fixed it in r8871 by using -2, -3... at the end of anchors (similar to what mediawiki does).
--------------------------------------------------------------------------------
Adam Pullen wrote:
> And maybe extend the requirement by allowing custom anchor names. Would be most useful in wiki when trying to write a use guide that would produce a "pretty and informative url"

This is out of the scope of this fix but you can use @h1(#anchor).@ to have custom anchors. This is part of the textile syntax.
--------------------------------------------------------------------------------
Thank you very much.

This will do just fine.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン1.3.2_42 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0