Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] help: replace underlining "help -a" headers using hyphens with a blank line

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:40

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
We want the underline to align with the text above, for example:

This is a header
----------------
content...

Unfortunately calculating text length could get complicated because
the text could be in any charset in translated Git. Avoid it and print
a blank line (i.e. charset neutral) instead. Readability is not
affected much. After the change we get:
When I said we do not need *pseudo* underline, I really meant it.  I
tentatively amended your patch to read like this:

    We used to underline a header text, like this:

        This is a header
        ----------------
        content...

    But calculating text length so that the dashes align with the text
    could get complicated because the text could be in any charset in
    translated Git.

    There is no point to use this pseudo underline; simply a blank
    line would do and it even makes it easier to read:

        This is a header

        content...

and adjusted the code to match, but it may make more sense to use the
GIT_COLOR* stuff for this to highlight the header line, allowing us to
lose the extra empty line.

This patch obviously conflicts with your own nd/columns so we may want
to take this slowly and it is OK to wait until columns graduates.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help