Opened 13 years ago
Closed 11 years ago
#9630 closed defect (fixed)
Non-functional bracketed tags: TracLinks
Reported by: | Ryan J Ollos | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | link rendering |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
The sentence fragment tag:subversion.
results in the tags query /tags?q='subversion.'
. This means that if you have a sentence such as Do a search for tag:subversion.
, the query is incorrect unless you add a space between tag:subversion
and the trailing period. This is unlike a wiki TracLink, in which the trailing period won't be incorporated (see #5523).
Example: Go to the page for wiki:TagsPlugin.
Second issue: Enclosing the tags TracLink in brackets doesn't result in a TracLink with the prefix removed, as is done for e.g. [wiki:TagsPlugin]
which yields TagsPlugin.
Attachments (1)
Change History (16)
Changed 13 years ago by
Attachment: | ExampleOfDefect.png added |
---|
comment:1 Changed 13 years ago by
comment:2 follow-ups: 3 6 Changed 13 years ago by
Keywords: | link rendering added |
---|
Then possible would want to exclude other non-letter-characters too, like ,;:!?
- right?
But please allow a general rambling: I remember another ticket where a similar issue has been raised, but for including whole sentences. While one might think, that adding options would be always fine, there is at least one related developer phrase: feature bloat, maybe more. I see the probability of satisfying every demand actually decreases with added complexity, because fewer people will be able to master the greater possibilities. Most probably (own experience) more users are distracted by increasing complexity. IMHO Trac is a good example for the "reduce to the max" paradigm. (Uff, sorry, feel better now. :-)
So I'll be willing to follow only after more complex character processing is verified. Nevertheless your examples look valid and might serve well at least as a starting point. But let's consider some more cases that spring into my mind:
- SW.Dev
- some sort of trademark, possible by only cleaning string 'edges', not deeper inside strings, or by using quotes to avoid ambiguous markup
- .SW!Dev.
- same as above, can only think of quoting to keep general reduction as the rule and still retain such a special case
- SWDev…
- common omission mark, somewhat harder to reduce to avoid too much reduction here, maybe solved by quoting too?
Regardless of what I said about quoting as a possible solution to almost all difficult cases, we should still try hard to require it as seldom as possible for convenience. The square bracketed version is common for labeled resource links, I know, but certainly not supported yet. Did it ever work for this plugin. I think no, at least not with tags>=0.6, right? And there has been a demand for caseless matching too. Certainly not exhaustive, but enough for now.
Anyway, thanks for the input, that might come about right as I'm actually in the process of re-defining the (Tag)WikiSyntaxProvider internals regarding quoting and more.
comment:3 follow-up: 4 Changed 13 years ago by
Replying to hasienda:
Regardless of what I said about quoting as a possible solution to almost all difficult cases, we should still try hard to require it as seldom as possible for convenience. The square bracketed version is common for labeled resource links, I know, but certainly not supported yet. Did it ever work for this plugin. I think no, at least not with tags>=0.6, right? And there has been a demand for caseless matching too. Certainly not exhaustive, but enough for now.
I haven't used TagsPlugin prior to 0.6 so I can't say if this was previously supported, and I completely agree with your concerns about feature bloat. My sole reason for reporting is that the behavior for a tags
TracLink does not match the behavior for the wiki
TracLink. As a user, I was thinking that since I can write "You should checkout the wiki:TagsPlugin.", I should also be able to write "Do a search for tag:rendering.". I need to dig deeper into this, but I think the behavior for the TagsPlugin TracLink should match that for built-in TracLinks.
So I think the key here is to follow the default behavior of Trac. The rules that apply for a TracLink wiki page should probably apply for a TracLink query. I can maybe dig into this over the weekend and submit a patch.
comment:4 follow-up: 5 Changed 13 years ago by
Replying to rjollos:
Replying to hasienda: ... So I think the key here is to follow the default behavior of Trac. The rules that apply for a TracLink wiki page should probably apply for a TracLink query.
Agree.
I can maybe dig into this over the weekend and submit a patch.
Save your time. As I already mentioned above, I'm already developing a complex patch set, and this will fit it nicely. Looking up the wiki:
processor as guidance should be trivial. If you could test my changes after commit, this would be most valuable.
comment:5 Changed 13 years ago by
Replying to hasienda:
If you could test my changes after commit, this would be most valuable.
Certainly. I'll be able to test right away.
comment:6 Changed 12 years ago by
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | A trailing period is incorporated into the TracLink → Prefix not removed from bracketed tags: TracLinks |
Follow-up on #5523 for stripping punctuation, please.
This ticket remains for the rendering issue related to bracketed tags:
link markup
comment:8 Changed 11 years ago by
Summary: | Prefix not removed from bracketed tags: TracLinks → Non-fuctional bracketed tags: TracLinks |
---|
#10612 has been closed as a duplicate of this ticket, but it has a patch worth reviewing.
comment:9 Changed 11 years ago by
comment:10 Changed 11 years ago by
(In [13131]) TagsPlugin: Allow short notation of bracketed tags:
TracLinks, refs #9630.
Applying Ryan J Ollos's fix suggested in his patch attached to #10612, making the corresponding one of the previously failing tests pass now.
comment:11 Changed 11 years ago by
Summary: | Non-fuctional bracketed tags: TracLinks → Non-functional bracketed tags: TracLinks |
---|
Just fixing a typo in the summary.
comment:12 Changed 11 years ago by
Description: | modified (diff) |
---|
Here is the markup that was used to generate the screen capture shown in comment:Description: