Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9437 closed enhancement (worksforme)

Make addAnchor more robust

Reported by: Mitar Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.4
Severity: normal Keywords:
Cc: mmitar@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I recommend that addAnchor JavaScript call is more robust like:

$("#content").find("h1,h2,h3,h4,h5,h6").filter("[id]").addAnchor("Link to this section");

In this way those headings without id would not be processed. Currently they are but there is no use of such anchor link which points to nowhere.

Such headings without ids (or where ids are not appropriate because headings are used in different context) are possible as a result of macros, for example.

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 14 years ago

Resolution: worksforme
Status: newclosed

Well, addAnchor() itself takes care of this.

comment:2 by Mitar, 14 years ago

True. This was discrepancy because I have manually upgraded jQuery but had addAnchor() for older version.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.