Opened 21 years ago
Last modified 10 years ago
#425 new enhancement
Wiki page name need to support digits and periods
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | wiki system | Version: | 0.8 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Restricting Wiki page names to only alphabetic chars makes it very have to create pages that discuss MilestoneV1.0 etc
Is there any problem with allowing digits and period?
Attachments (0)
Change History (19)
comment:1 by , 21 years ago
Milestone: | → 0.7.1 |
---|---|
Status: | new → assigned |
comment:2 by , 21 years ago
comment:3 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I changed my mind and added support for periods as well.
Fixed in both trunk and 0.7-stable.
comment:4 by , 20 years ago
This feature appears to have been removed in 0.8 (presumably related to ticket #775).
comment:5 by , 20 years ago
Component: | general → wiki |
---|---|
Milestone: | 0.7.1 |
Resolution: | fixed |
Status: | closed → reopened |
Version: | 0.6.1 → 0.8 |
I didn't know about these tickets, and ended up implementing it for myself…
I think this depends on the software being worked on. Here we have a product suite with 3D in the name. It would be rather annoying to spell each related wiki page ThreeD something…
What about making this feature configurable?
[wiki] allow_digits_in_name = 1
comment:6 by , 20 years ago
Note that ThreeD isn't a valid wiki name either, it'd have to be ThreeDee.
So we want to avoid that names such as A0B1 (the example from #775) are recognized as wiki page names. Quite obviously A0B1 has nothing camel-ish to it.
One option would be to treat digits as uppercase characters. So A0B1 would not be a wiki name, but 1a2b would be. So you could use e.g. 3d as a wiki page names. Does that feel right? I'm not sure.
And for what it's worth, I'm not really in favor of adding configuration options that alter the wiki syntax like this.
comment:7 by , 20 years ago
One option would be to treat digits as uppercase characters.
That would help, but it would be useful to have consecutive digits:
- AboutUnigraphics21
- Jbuilder2005News
- Lotus123isObsolete
- Our3dApp
- ReleaseNotes8200
The following:
!python # ... wiki = r"""(?P<wikilink>!?(^|(?<=[^A-Za-z\d]))[A-Z][a-z][a-z\d]*(?:[A-Z][a-z\d]*[a-z\d/])+(?=\Z|\s|[.,;:!?\)}\]]))"""
matches all of the above and none of #775.
It is still quite easy to fool, like with Aa1B0. But then, AaxZqerzW" doesn't look to be a valid wiki page name from a human perspective either…
comment:8 by , 20 years ago
Sorry, I just saw that I added another messed up comment! One day, I will use the Preview feature, promised :). In the meantime I'll work on edit/delete action for comments, along the line of what I did in #948 for the attachments…
comment:9 by , 20 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
The upcoming InterTrac related wiki refactoring will enable the creation of alternate WikiPageNames rules. As examples, I'll write one that integrates my old proposal above, and one that follows the SubWiki rules.
comment:10 by , 19 years ago
Severity: | normal → enhancement |
---|---|
Status: | new → assigned |
comment:11 by , 19 years ago
Milestone: | → 1.0 |
---|---|
Severity: | normal → minor |
Should I backport the above to the trunk?
comment:12 by , 19 years ago
Well, there seems to be a lot of debate about automatic CamelCase linking right now and I think that mixing in possibilities for digits, etc. will possibly match even weirder page names like cmlenz mentioned above that don't really make sense as WikiNames.
I think that we should put requests for changes to the CamelCase criteria on hold to discuss it a bit. Since it's pretty easy now to use [wiki:MilestoneV1.0]
I don't really see a reason to add this complexity to the CamelCase matching.
comment:13 by , 19 years ago
I should also not that milestone pages can already contain Wiki content, so creating a separate Wiki page for a milestone is probably not a good idea and the relevant information should just be put on the milestone page such as milestone:1.0
comment:14 by , 19 years ago
Priority: | normal → high |
---|---|
Severity: | minor → normal |
See also FlexibleWikiPageNames.
The particular syntax that would allow as Wiki page names:
- AboutUnigraphics21
- Jbuilder2005News
- Lotus123isObsolete
- Our3dApp
- ReleaseNotes8200
(but none of A0B1, ST62T53C6, IR32V1H000, the examples from #775),
can be enabled by modifying the [components]
section of the TracIni
in the following way:
[components] # Standard Trac WikiPageNames rule trac.wiki.api.StandardWikiPageNames = disabled # Standard Trac WikiPageNames rule, plus digits trac.wiki.api.FlexibleWikiPageNames = enabled # SubWiki-like rules for WikiPageNames. trac.wiki.api.SubWikiPageNames = disabled
comment:15 by , 18 years ago
Replying to barry.scott@onelan.co.uk:
Restricting Wiki page names to only alphabetic chars makes it very have to create pages that discuss MilestoneV1.0 etc
Is there any problem with allowing digits and period?
that's no problem.
comment:16 by , 16 years ago
In #8119, another user took for granted that digits were allowed in a wiki page name…
comment:18 by , 15 years ago
Milestone: | triaging → next-major-0.1X |
---|---|
Priority: | high → normal |
Still interested in that, in the longer term.
comment:19 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Good point, I just think this is something we've overlooked.