Fossil

View Ticket
Login
2015-02-17
01:03 Closed ticket [ab82a0bd21]: Enhance <nowiki>[]</nowiki> linking syntax in the wiki to permit #LABEL for internal links. plus 3 other changes artifact: 0e21eb0fa7 user: drh
2009-09-25
07:03 Open ticket [ab82a0bd21]. artifact: 7f078446e5 user: anonymous
2009-09-21
04:54 Ticket [ab82a0bd21]: 1 change artifact: 4878ce67f2 user: anonymous
2009-09-19
15:17 Fixed ticket [ab82a0bd21]. artifact: f89122858d user: drh
15:14
Accept wiki hyperlinks of the form: <nowiki><b>[#label]</b></nowiki> Ticket [ab82a0bd213b] check-in: 3a4c7f60a2 user: drh tags: trunk
2009-09-17
10:26 New ticket [ab82a0bd21] Enhance [] linking syntax in the wiki to permit #LABEL for internal links.. artifact: 8ea89f07fb user: anonymous

Ticket Hash: ab82a0bd213bc0f7e1d2f53abcd019640109f0d3
Title: Enhance <nowiki>[]</nowiki> linking syntax in the wiki to permit #LABEL for internal links.
Status: Closed Type: Code_Defect
Severity: Cosmetic Priority: Low
Subsystem: Resolution: Not_A_Bug
Last Modified: 2015-02-17 01:03:28
11.13 years ago
Created: 2009-09-17 10:26:07
16.55 years ago
Version Found In: [bbb8ae7ebf]
Description:
It is fairly common to use anchors in HTML pages like:
<a name="INTERNAL_LINK">Named Location</a>

These kinds of links are used to internally or externally jump to the named locations via anchors like:

<a href="#INTERNAL_LINK">My internal link.</a>

I'd like to propose to syntax enhancements to the Wiki syntax. The first of these is:

[#INTERNAL_LINK]
[#INTERNAL_LINK|My internal link.]

These would translate into the following respectively:

<a href="#INTERNAL_LINK">INTERNAL_LINK</a>
<a href="#INTERNAL_LINK">My internal link.</a>

The second piece of syntax is the actual label. I'd like to be able to drop an anchor without the clumsy HTML by doing this:

[@INTERNAL_LINK]
[@INTERNAL_LINK|My named anchor.]

This would translate directly into:

<a name="INTERNAL_LINK"></a>
<a name="INTERNAL_LINK">My named anchor.</a></code>

If you think the idea is sound, give a developer account to the userid "michael" and email me the password so I can try my hand at implementing it.


drh added on 2009-09-19 15:17:53:
Added the [#INTERNAL] form in check-in [3a4c7f60a27f]. Bu the [@INTERNAL] is a new syntax that is not necessary and would be rarely used, so it is rejected.


anonymous added on 2009-09-21 04:54:40:
I'm puzzled by how the [#LINK] form would be useful but [@LINK] not.

Consider a sizable documentation page written in the wiki format. I'd have headers for each section and I'd likely want a ToC at the top for them. Currently I'd have to do them this way:

...ToC...
  *  [#SECTION3-3|Section 3.3: The way of the world]
...
...Content...
<h3><a name="SECTION3-3">Section 3.3: The way of the world</a></h3>

To me the header text is obfuscated beyond all recognition. It would be hard to locate while editing and just generally looks ugly (like HTML in general looks).

With my propose [@LINK] form, the ToC section remains the same (nicely readable) and the header section is changed to:

<h3>[@SECTION3-3|Section 3.3: The way of the world]</h3>

The first benefit I can see is that the contents are parallel in both locations. It's easy to match the patterns. The second benefit I can see is that the second is a whole lot easier to read the title text in, making it simpler to locate when scanning quickly.


anonymous added on 2009-09-25 07:03:43:
Re-opening: When the [#LABEL] form is used, the display of it should not include the opening "#" character. So the example given here should expand to LABEL instead of #LABEL as it currently does.