The test suite was emitting a lot of ugly gettext warnings;
setting LC_ALL didn't solve the problem for all locale setups
(since ikiwiki remaps it to LANG, and ikiwiki didn't know about
the C locale).
People also seem generally annoyed by the messages when
Locale::Gettext is not installed, and I suspect will be
generally happier if it just silently doesn't localize.
The optimisation came about when I noticed that the gettext
sub was doing rather a lot of work each call just to see
if localisation is needed. We can avoid that work by caching,
and the best thing to cache is a version of the gettext sub
that does exactly the right thing.
This was slightly complicated by the locale setting,
which might need to override the original locale (or lack
thereof) after gettext has been called. So it needs to invalidate
the cache in that case. It used to do it via a global variable,
which I am happy to have also gotten rid of.
This reverts commit 2ed033a4aa.
It has been more properly fixed in upstream's master, that will be merged in
immediately.
Signed-off-by: intrigeri <intrigeri@boum.org>
Since this page is not in the basewiki, it is confusing to put it in
the ikiwiki subdir, which is intended for basewiki and other underlay pages
that are used to document ikiwiki on other wikis.
I'm sorry, but you can't simply go around adding links to pages that are
part of the basewiki, that point to pages outside the basewiki. Doing
so causes the test suite to fail, since the basewiki is then not
self-contained and has broken links.
FYI, the ikiwiki/anchor page you added is not part of the basewiki because
there's not a symlink to it in underlays/basewiki/ikiwiki in ikiwiki's
source. And I can't condone cluttering up the basewiki with such a page,
at least unless it gets significantly more useful somehow.
Do not allow an unterminated """ string to be treated as a series of bare
words. Fixes runaway regexp recursion/backtracking in strange situations.
(See 1d57a21c98 for test case.)
A directive that contains an unterminated """ string should not
cause each word of the string to be treated as a bare word. Instead,
the directive should fail to parse.
There are two tests. One just checks that a complete directive
containing such a string fails to parse. The other checks for a case
where a directive ends with a very long unterminated """ string,
and the directive is itself not closed. While this test won't fail,
it does trigger a nasty perl warning.