Thread (1 message) 1 message, 1 author, 2024-03-21

Re: [PATCH v4 4/4] config.txt: describe handling of whitespace further

From: Junio C Hamano <hidden>
Date: 2024-03-21 07:32:09

Eric Sunshine [off-list ref] writes:
    Whitespace surrounding `name`, `=` and `value` is ignored. If
    `value` is surrounding by double quotation marks (`"`), all
    characters within the quoted string are retained verbatim,
    including whitespace. Comments starting with either `#` or `;` and
    extending to the end of line are discarded. A line that defines a
    value can be continued to the next line by ending it with a `\`;
    the backslash and the end-of-line are stripped.
Nice, but I am not sure how this captures how whitespaces between
value and comment are handled, e.g., in this line

	|  name = value # comment$

humans know the space before '#' is removed because it is
"whitespace surrounding value".  But there is a bit of chicken and
egg problem; before you realize '# comment' is a comment and strip
it from the line, you do not know where value ends, so your reading
of the above need to backtrack.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help