ikiwiki/doc/bugs/linkmap_displays_underscore...

35 lines
1.6 KiB
Plaintext
Raw Normal View History

[[!template id=gitbranch branch=chrysn/linkmapenhancement author="[[chrysn]]"]]
[[ikiwiki/directive/linkmap]]s display the file name instead of the pagetitle, showing unsightly underscore escapes and underscores instead of blanks to users.
the attached [[!taglink patch]] fixes this; from its commit message:
display the pagetitle() in linkmaps
without this patch, linkmaps display underscores and underscore escape
sequences in the rendered output.
this introduces a pageescape function, which invoces pagetitle() to get
rid of underscore escapes and wraps the resulting utf8 string
appropriately for inclusion in a dot file (using dot's html encoding
because it can represent the '\"' dyad properly, and because it doesn't
need special-casing of newlines).
2012-03-15 14:57:23 +01:00
the output will look much better (at least in my wikis) with the "[[bugs/pagetitle function does not respect meta titles]]" issue fixed.
2014-07-03 21:03:01 +02:00
> I agree that it's (likely to be) a bug to not use `pagetitle()`. I
> haven't reviewed this particular implementation yet but I'll try to
> do that soon.
>
> I don't think it's correct for `pagetitle()` to output `\[[!meta title]]`
> though, as discussed on the linked bug: it appears in an assortment of
> contexts where the full formal title of the page seems inappropriate.
> If you want linkmap to use `\[[!meta title]]`, I think it would be
> better to give it a `show` parameter, like `\[[!map]]` has?
> --[[smcv]]
the patch is stored in [[the patch.pl]] as created by git-format-patch, and can
be pulled from the abovementioned branch.
2014-06-29 20:06:26 +02:00
> update 2014-06-29: branch still merges cleanly and works. --[[chrysn]]