[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] [PATCH] its: Add new preserveSpaceRule "paragraph"
From: |
Daiki Ueno |
Subject: |
Re: [bug-gettext] [PATCH] its: Add new preserveSpaceRule "paragraph" |
Date: |
Wed, 27 Mar 2019 10:07:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> But the test xgettext-its-1 fails. The reason is that in these two lines
>
> pp += strspn (pp, " \t\n");
> if (*pp == '\n')
>
> the condition (*pp == '\n') is always false: after you go past all
> whitespace characters, the next character is never a newline.
Nice catch, and thank you for the fix. I wonder why it was not caught
by my test run.
> I fixed this by replacing this condition with a memchr() invocation.
> While at it, I also removed the state variable 'last_ws' and the
> initial trim() call, and renamed the variables to identifiers that
> are more descriptive.
Would you like to apply this to the 'default:' case as well?
Regards,
--
Daiki Ueno