]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/linkmap_displays_underscore_escapes.mdwn
reply to smcv's comment
[ikiwiki.git] / doc / bugs / linkmap_displays_underscore_escapes.mdwn
1 [[!template id=gitbranch branch=chrysn/linkmapenhancement author="[[chrysn]]"]]
2
3 [[ikiwiki/directive/linkmap]]s display the file name instead of the pagetitle, showing unsightly underscore escapes and underscores instead of blanks to users.
4
5 the attached [[!taglink patch]] fixes this; from its commit message:
6
7     display the pagetitle() in linkmaps
8     
9     without this patch, linkmaps display underscores and underscore escape
10     sequences in the rendered output.
11     
12     this introduces a pageescape function, which invoces pagetitle() to get
13     rid of underscore escapes and wraps the resulting utf8 string
14     appropriately for inclusion in a dot file (using dot's html encoding
15     because it can represent the '\"' dyad properly, and because it doesn't
16     need special-casing of newlines).
17
18 the output will look much better (at least in my wikis) with the "[[bugs/pagetitle function does not respect meta titles]]" issue fixed.
19
20 > I agree that it's (likely to be) a bug to not use `pagetitle()`. I
21 > haven't reviewed this particular implementation yet but I'll try to
22 > do that soon.
23 >
24 > I don't think it's correct for `pagetitle()` to output `\[[!meta title]]`
25 > though, as discussed on the linked bug: it appears in an assortment of
26 > contexts where the full formal title of the page seems inappropriate.
27 > If you want linkmap to use `\[[!meta title]]`, I think it would be
28 > better to give it a `show` parameter, like `\[[!map]]` has?
29 > --[[smcv]]
30
31 >> sounds good; i'll have a look at it the next time i touch the linkmap
32 >> plugin. the patch at hand would be a starting point for that. --[[chrysn]]
33
34 the patch is stored in [[the patch.pl]] as created by git-format-patch, and can
35 be pulled from the abovementioned branch.
36
37 > update 2014-06-29: branch still merges cleanly and works. --[[chrysn]]