Opened 7 years ago
Last modified 7 years ago
#13379 new enhancement
Suggest anchors of wiki pages
Reported by: | anonymous | Owned by: | Peter Suter |
---|---|---|---|
Priority: | normal | Component: | WikiAutoCompletePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
Trac allows linking to anchors of wiki page titles: wiki:TracLinks#Linkanchors. It would be nice to suggest the available anchors (like #Linkanchors
etc.) after typing wiki:PageName#
.
Attachments (3)
Change History (7)
Changed 7 years ago by
Attachment: | T13379_suggest_wikipage_anchors.patch added |
---|
comment:1 Changed 7 years ago by
Changed 7 years ago by
Attachment: | Screen Shot 2018-03-13 at 10.18.52.png added |
---|
Changed 7 years ago by
Attachment: | Screen Shot 2018-03-13 at 10.20.17.png added |
---|
comment:2 Changed 7 years ago by
Minor issue with T13379_suggest_wikipage_anchors.patch, the anchors aren't filtered the way wiki page names are. For example, type C
and get a list of pages starting with C
:
Type, A
, and the list of anchors is not filtered to those starting with A
:
comment:3 Changed 7 years ago by
Suggesting the valid page versions would also be useful.
Agreed, good idea.
the anchors aren't filtered
Good point, I forgot we need something like ... if anchor.startswith(term)
because "cache": False
.
comment:4 Changed 7 years ago by
In the patch, it uses Formatter
class to extract header anchors but Formatter
class expands macros in wiki text. So that it is slow. I think we should create subclass of Formatter
which doesn't expand macros.
Suggesting the valid page versions would also be useful. That is, after typing
wiki:PageName@
. A shortened page comment could be included in the suggestion.