D3648: show: Get rid of extraneous space if `tip` also has other bookmarks
Yuya Nishihara
yuya at tcha.org
Wed May 23 08:40:02 EDT 2018
> -names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', join(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
> +names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', separate(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
`separate()` can't be used here since it takes non-list arguments.
`separate(sep, arg1, arg2, ...)`
What we can do for now is to move the separator to the inner loop, and
strip the leading/trailing separator.
`strip(names % "{ifeq(..., "{name} ")}")`
Maybe we'll need a function to filter out empty values?
More information about the Mercurial-devel
mailing list