Upstream changes:
https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.0
1.13.0 / 2022-01-06
Notes
Ruby
This release introduces native gem support for Ruby 3.1. Please note that
Windows users should use the x64-mingw-ucrt platform gem for Ruby 3.1, and
x64-mingw32 for Ruby 2.6-3.0 (see RubyInstaller 3.1.0 release notes).
This release ends support for:
* Ruby 2.5, for which official support ended 2021-03-31.
* JRuby 9.2, which is a Ruby 2.5-compatible release.
Faster, more reliable installation: Native Gem for ARM64 Linux
This version of Nokogiri ships experimental native gem support for the
aarch64-linux platform, which should support AWS Graviton and other ARM Linux
platforms. We don't yet have CI running for this platform, and so we're
interested in hearing back from y'all whether this is working, and what
problems you're seeing. Please send us feedback here: Feedback: Have you used
the aarch64-linux native gem?
Publishing
This version of Nokogiri opts-in to the "MFA required to publish" setting on
Rubygems.org. This and all future Nokogiri gem files must be published to
Rubygems by an account with multi-factor authentication enabled. This should
provide some additional protection against supply-chain attacks.
A related discussion about Trust exists at #2357 in which I invite you to
participate if you have feelings or opinions on this topic.
Dependencies
* [CRuby] Vendored libiconv is updated from 1.15 to 1.16. (Note that libiconv
is only redistributed in the native windows and native darwin gems, see
LICENSE-DEPENDENCIES.md for more information.) [#2206]
* [CRuby] Upgrade mini_portile2 dependency from ~> 2.6.1 to ~> 2.7.0. ("ruby"
platform gem only.)
Improved
* {XML,HTML4}::DocumentFragment constructors all now take an optional parse
options parameter or block (similar to Document constructors). [#1692]
(Thanks, @JackMc!)
* Nokogiri::CSS.xpath_for allows an XPathVisitor to be injected, for
finer-grained control over how CSS queries are translated into XPath.
* [CRuby] XML::Reader#encoding will return the encoding detected by the
parser when it's not passed to the constructor. [#980]
* [CRuby] Handle abruptly-closed HTML comments as recommended by WHATWG.
(Thanks to tehryanx for reporting!)
* [CRuby] Node#line is no longer capped at 65535. libxml v2.9.0 and later
support a new parse option, exposed as
Nokogiri::XML::ParseOptions::PARSE_BIG_LINES, which is turned on by default
in ParseOptions::DEFAULT_{XML,XSLT,HTML,SCHEMA} (Note that JRuby already
supported large line numbers.) [#1764, #1493, #1617, #1505, #1003, #533]
* [CRuby] If a cycle is introduced when reparenting a node (i.e., the node
becomes its own ancestor), a RuntimeError is raised. libxml2 does no
checking for this, which means cycles would otherwise result in infinite
loops on subsequent operations. (Note that JRuby already did this.) [#1912]
* [CRuby] Source builds will download zlib and libiconv via HTTPS. ("ruby"
platform gem only.) [#2391] (Thanks, @jmartin-r7!)
* [JRuby] Node#line behavior has been modified to return the line number of
the node in the final DOM structure. This behavior is different from CRuby,
which returns the node's position in the input string. Ideally the two
implementations would be the same, but at least is now officially
documented and tested. The real-world impact of this change is that the
value returned in JRuby is greater by 1 to account for the XML prolog in
the output. [#2380] (Thanks, @dabdine!)
Fixed
* CSS queries on HTML5 documents now correctly match foreign elements (SVG,
MathML) when namespaces are not specified in the query. [#2376]
* XML::Builder blocks restore context properly when exceptions are raised.
[#2372] (Thanks, @ric2b and @rinthedev!)
* The Nokogiri::CSS::Parser cache now uses the XPathVisitor configuration as
part of the cache key, preventing incorrect cache results from being
returned when multiple XPathVisitor options are being used.
* Error recovery from in-context parsing (e.g., Node#parse) now always uses
the correct DocumentFragment class. Previously
Nokogiri::HTML4::DocumentFragment was always used, even for XML documents.
[#1158]
* DocumentFragment#> now works properly, matching a CSS selector against only
the fragment roots. [#1857]
* XML::DocumentFragment#errors now correctly contains any parsing errors
encountered. Previously this was always empty. (Note that
HTML::DocumentFragment#errors already did this.)
* [CRuby] Fix memory leak in Document#canonicalize when inclusive namespaces
are passed in. [#2345]
* [CRuby] Fix memory leak in Document#canonicalize when an argument type
error is raised. [#2345]
* [CRuby] Fix memory leak in EncodingHandler where iconv handlers were not
being cleaned up. [#2345]
* [CRuby] Fix memory leak in XPath custom handlers where string arguments
were not being cleaned up. [#2345]
* [CRuby] Fix memory leak in Reader#base_uri where the string returned by
libxml2 was not freed. [#2347]
* [JRuby] Deleting a Namespace from a NodeSet no longer modifies the href to
be the default namespace URL.
* [JRuby] Fix XHTML formatting of closing tags for non-container elements.
[#2355]
Deprecated
* Passing a Nokogiri::XML::Node as the second parameter to Node.new is
deprecated and will generate a warning. This parameter should be a kind of
Nokogiri::XML::Document. This will become an error in a future version of
Nokogiri. [#975]
* Nokogiri::CSS::Parser, Nokogiri::CSS::Tokenizer, and Nokogiri::CSS::Node
are now internal-only APIs that are no longer documented, and should not be
considered stable. With the introduction of XPathVisitor injection into
Nokogiri::CSS.xpath_for there should be no reason to rely on these internal
APIs.
* CSS-to-XPath utility classes Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins
and XPathVisitorOptimallyUseBuiltins are deprecated. Prefer
Nokogiri::CSS::XPathVisitor with appropriate constructor arguments. These
classes will be removed in a future version of Nokogiri.
8.1.1 - 2022-01-06
------------------
* Restored ABI compatibility with version 8.0.x
* Fixed chorno formatting on big endian systems
* Fixed a linkage error with mingw
8.1.0 - 2022-01-02
------------------
* Optimized chrono formatting
Processing of some specifiers such as ``%z`` and ``%Y`` is now up to 10-20
times faster, for example on GCC 11 with libstdc++::
----------------------------------------------------------------------------
Benchmark Before After
----------------------------------------------------------------------------
FMTFormatter_z 261 ns 26.3 ns
FMTFormatterCompile_z 246 ns 11.6 ns
FMTFormatter_Y 263 ns 26.1 ns
FMTFormatterCompile_Y 244 ns 10.5 ns
----------------------------------------------------------------------------
* Implemented subsecond formatting for chrono durations
For example (`godbolt <https://godbolt.org/z/es7vWTETe>`__):
.. code:: c++
#include <fmt/chrono.h>
int main() {
fmt::print("{:%S}", std::chrono::milliseconds(1234));
}
prints "01.234".
* Fixed handling of precision 0 when formatting chrono durations
* Fixed an overflow on invalid inputs in the ``tm`` formatter
* Added ``fmt::group_digits`` that formats integers with a non-localized digit
separator (comma) for groups of three digits.
For example (`godbolt <https://godbolt.org/z/TxGxG9Poq>`__):
.. code:: c++
#include <fmt/format.h>
int main() {
fmt::print("{} dollars", fmt::group_digits(1000000));
}
prints "1,000,000 dollars".
* Added support for faint, conceal, reverse and blink text styles
* Added experimental support for compile-time floating point formatting
It is currently limited to the header-only mode.
* Added UDL-based named argument support to compile-time format string checks
For example (`godbolt <https://godbolt.org/z/ohGbbvonv>`__):
.. code:: c++
#include <fmt/format.h>
int main() {
using namespace fmt::literals;
fmt::print("{answer:s}", "answer"_a=42);
}
gives a compile-time error on compilers with C++20 ``consteval`` and non-type
template parameter support (gcc 10+) because ``s`` is not a valid format
specifier for an integer.
* Implemented escaping of string range elements.
For example (`godbolt <https://godbolt.org/z/rKvM1vKf3>`__):
.. code:: c++
#include <fmt/ranges.h>
#include <vector>
int main() {
fmt::print("{}", std::vector<std::string>{"\naan"});
}
is now printed as::
["\naan"]
instead of::
["
aan"]
* Switched to JSON-like representation of maps and sets for consistency with
Python's ``str.format``.
For example (`godbolt <https://godbolt.org/z/seKjoY9W5>`__):
.. code:: c++
#include <fmt/ranges.h>
#include <map>
int main() {
fmt::print("{}", std::map<std::string, int>{{"answer", 42}});
}
is now printed as::
{"answer": 42}
* Extended ``fmt::join`` to support C++20-only ranges
* Optimized handling of non-const-iterable ranges and implemented initial
support for non-const-formattable types.
* Disabled implicit conversions of scoped enums to integers that was
accidentally introduced in earlier versions
* Deprecated implicit conversion of ``[const] signed char*`` and
``[const] unsigned char*`` to C strings.
* Deprecated ``_format``, a legacy UDL-based format API
* Marked ``format``, ``formatted_size`` and ``to_string`` as ``[[nodiscard]]``
* Added missing diagnostic when trying to format function and member pointers
as well as objects convertible to pointers which is explicitly disallowed
* Optimized writing to a contiguous buffer with ``format_to_n``
* Optimized writing to non-``char`` buffers
* Decimal point is now localized when using the ``L`` specifier.
* Improved floating point formatter implementation
* Fixed handling of very large precision in fixed format
* Made a table of cached powers used in FP formatting static
* Resolved a lookup ambiguity with C++20 format-related functions due to ADL
* Removed unnecessary inline namespace qualification
* Implemented argument forwarding in ``format_to_n``
* Fixed handling of implicit conversions in ``fmt::to_string`` and format string
compilation
* Changed the default access mode of files created by ``fmt::output_file`` to
``-rw-r--r--`` for consistency with ``fopen``
* Make ``fmt::ostream::flush`` public
* Improved C++14/17 attribute detection
* Improved documentation
* Improved fuzzers and added a fuzzer for chrono timepoint formatting
* Added the ``FMT_SYSTEM_HEADERS`` CMake option setting which marks {fmt}'s
headers as system. It can be used to suppress warnings
* Added the Bazel build system support
* Improved build configuration and tests
* Fixed various warnings and compilation issues
2.0.0
Removed
Python 3.6 support
Support for text file objects as load input. Use binary file objects instead.
First argument of load and loads can no longer be passed by keyword.
Fixed
Allow lower case "t" and "z" in datetimes
Improved
Raise an error when dotted keys define values outside the "current table". Technically speaking TOML v1.0.0 does allow such assignments but that isn't intended by specification writers, and will change in a future specification version (see the pull request).
changes from changelog:
2022-01-06 -- 0.9.6
>>>>>>>>>>>>> SECURITY >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
* Fixed: [CVE-2021-46141]
Fix a bug affecting both uriNormalizeSyntax* and uriMakeOwner*
functions where the text range in .hostText would not be duped using
malloc but remain unchanged (and hence "not owned") for URIs with
an IPv4 or IPv6 address hostname; depending on how an application
uses uriparser, this could lead the application into a use-after-free
situation.
As the second half, fix uriFreeUriMembers* functions that would not
free .hostText memory for URIs with an IPv4 or IPv6 address host;
also, calling uriFreeUriMembers* multiple times on a URI of this
very nature would result in trying to free pointers to stack
(rather than heap) memory (GitHub #121, GitHub #124)
Commit 987b046e41f407d17c622e580fc82a5e834b4329
Commit b1a34743bc1472e055d886e29e9b53f670eb3282
* Fixed: [CVE-2021-46142]
Fix functions uriNormalizeSyntax* for out-of-memory situations
(i.e. malloc returning NULL) for URIs containing empty segments
(any of user info, host text, query, or fragment) where previously
pointers to stack (rather than heap) memory were freed (GitHub #122,
GitHub #124)
Commit c0483990e6b5b454f7c8752b36760cfcb0d093f5
>>>>>>>>>>>>> SECURITY >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
* Fixed: CMake: Call "enable_language(CXX)" prior to tinkering with
CMAKE_CXX_* variables (GitHub #110)
Thanks to Alexander Richardson for the patch (originally at libexpat)
* Fixed: CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR
and CMAKE_INSTALL_INCLUDEDIR (GitHub #114)
Thanks to Rafael Fontenelle for bringing this up (originally at libexpat)
* Fixed: Windows: Address MSVC compiler warnings (GitHub #111, GitHub #113)
* Fixed: Documentation: Space requirements for uriUriStringToUnixFilename
did not take into account short form "file:/bin/bash" of RFC 8089 of 2017
(with prefix "file:/" rather than "file:///") that uriparser supports
since release 0.8.6 in 2018 (GitHub #118, GitHub #119)
* Fixed: Compile error with MinGW GCC 9 related to a mismatched prototype
for function inet_ntop (GitHub #117, GitHub #120)
Thanks to Sandro Mani for the report!
* Fixed: Compile warnings in test suite code (GitHub #120)
* Improved: Respect variable ${CPP} in doc/preprocess.sh (GitHub #115)
* Added: Test suite invocation for MinGW using Wine (GitHub #120)
* Soname: 1:29:0 see https://verbump.de/ for what these numbers do
Version 2.11.2
--------------
- Updated lexers:
* C-family: Fix incorrect handling of labels
* Java: Fixed an issue with ``record`` keywords result in ``Error`` tokens in some cases
- Fix links to line numbers not working correctly
- Remove ``underline`` from ``Whitespace`` style in the ``Tango`` theme
- Fix ``IRC`` and ``Terminal256`` formatters not backtracking correctly for custom token types, resulting in some unstyled tokens
Version 2.11.1
--------------
- Updated lexers:
* C-family: Handle return types with multiple tokens (e.g. ``unsigned int``)
* JSON: Fix a regression which caused whitespace before ``:`` to result in ``Error`` tokens
* SPICE: Various improvements
v2.3.0
======
#7: Add support for a ``calc()`` within a ``calc()``.
v2.2.0
======
Minor cleanup.
Restored package version reporting when fetching URLs.
v2.1.0
======
Adopted `jaraco/skeleton <https://github.com/jaraco/skeleton>`_.
Delinted codebase.
Removed ``cssutils.VERSION`` and ``cssutils.__version__``.
Consumers wishing to know the version should use
``importlib.metadata.version('cssutils')``.
v2.0.0
======
New `maintainer <https://pypi.org/user/jaraco>`_ revives the project
and moves `hosting <https://github.com/jaraco/cssutils>`_ with
continuous integration testing.
Refreshed packaging.
Project now requires Python 3.6 or later.
This flag should be set for packages that import pkg_resources
and thus need setuptools after the build step.
Set this flag for packages that need it and bump PKGREVISION.
5.1.0
Changed
Strip debugging symbols from Linux binaries
5.0.0
Added
Use cibuildwheel to build wheels
Removed
Drop support for soon-EOL Python 3.6
Fixed
Install Twine to upload to PyPI
documentation:
* configure: Add missing AC_ARG_VAR for all programs so that they are
documented in --help output, and so that autoconf knows they are "precious"
and preserves them if configure is rerun even when they're specified via an
environment variable.
* Add usage examples for $jsonobject.
* Fix path to omega in quickstart document. Fixes#813, reported by Jim Lynch.
* Update for the IRC channel move from freenode to libera.chat.
indexers:
* Fix handling of UTF-16 BOMs in XML and HTML - we had the sense of the
endianness indicated by the BOM the wrong way round.
* Avoid making an extra temporary copy of HTML/XML data which has a UTF16 BOM.
* We now ignore an end of line immediately after a PHP close tag to match what
PHP does.
* omindex:
+ Fix handling of formatted xlsx dates in certain cases.
* scriptindex:
+ Add new scriptindex whitespace removal actions `ltrim`, `rtrim`, `squash`,
and `trim`.
+ Improve `truncate` action - if a word ends exactly on the requested length
we now leave it in place rather than removing it.
+ Report the location of previous `unique` action in the error given when
`unique` is used more than once.
omega:
* Clamp START and END with packed timestamps. The 4-byte unsigned packed
time_t format can't represent dates before 1970 or after Sun 07 Feb 2106
06:28:15 UTC so clamp dates before or after these - previously they would
wrap around.
* The JSON produced by $jsonobject no longer contains newlines, which makes it
usable as a single line serialisation format without post-processing.
* Add $base64 OmegaScript command.
* omega: Add flag_no_positions to wrap new
Xapian::QueryParser::FLAG_NO_POSITIONS.
templates:
* Fix topterms template to not trigger early matching. We were checking $msize
before including the `query` template, but doing so would trigger the query
to be run, which means that settings early in the `query` template which
should affect the result (such as $setmap{prefix,...}) were being ignored
when the `topterms` template was used. Partly addresses #815, reported by
Gennadiy.
* Add field support to opensearch and xml templates. These templates now also
search title, topic and filename by default and support `title:`, `author:`
and `topic:` in the query string (both like the template `query` already
does). Fixes remaining issue in #815, reported by Gennadiy.
testsuite:
* Expand omegatest. All scriptindex actions now have test coverage.
build system:
* Replace uses of obsolete autoconf macros, fixing warnings if configure is
regenerated with a recent release of autoconf.
portability:
* Don't automatically use _FORTIFY_SOURCE on mingw-w64. Recent mingw-w64
versions require -lssp to be linked when _FORTIFY_SOURCE is enabled, so just
skip the automatic enabling. Users who want to enable it can specify it
explicitly.
Fixes#808, reported by xpbxf4.
* Automatically enable GCC warnings -Wduplicated-cond and -Wduplicated-branches
if using a GCC version new enough to support them. The usefulness of
-Wduplicated-cond was highlighted by dcb in #816.
* Fix GCC -Wshadow warning.
* Use clock_gettime() and nanosleep() under modern mingw as these allow higher
precision than what we previously used.
API:
* New QueryParser::FLAG_NO_POSITIONS flag. With this flag enabled, any query
operations which would use positional information are replaced by the nearest
equivalent which doesn't (so phrase searches, NEAR and ADJ will result in
OP_AND). This is intended to replace the automatic conversion of OP_PHRASE,
etc to OP_AND when a database has no positional information, which will no
longer happen in the release series after 1.4.
* Give a compile error for code which adds a Database to WritableDatabase.
Prior to 1.4.19, this compiled and effectively created a "black-hole" shard
which quietly discarded any changes made to it.
In 1.4.19 it's still possible to perform this operation by assigning the
WritableDatabase to a Database first, which is harder to fix. This case
throws an exception on git master where it's easier to address.
Reported by David Bremner on #xapian.
* Fix TermIterator::skip_to() with sharded databases which sometimes was
failing to advance all the way to the requested term. Uncovered while
addressing warning from GCC's -Wduplicated-cond, reported by dcb in #816.
* Clamp edit distance to one less than the length of the word we've been asked
to correct, which makes the algorithm we use more efficient. We already
require suggestion to have at least one character in common, so the only
change to suggestions is we'll no longer suggest corrections which are
twice as long or longer even if the edit distance would allow it, which
seems like an improvement in itself.
* Minor optimisation expanding wildcards.
* PostingIterator::get_description(): For an all-docs iterator on a glass
database, get_description() would call get_docid() which isn't valid to
do once the iterator has reached the end.
testsuite:
* Expand allterms test coverage.
matcher:
* Fetch wdf upper bound from postlist which avoids an extra postlist table
cursor seek per weighted query term, and also means we now use a per-shard
wdf upper bound for local shards which will in typically give a tighter
weight upper bound which will tend to make various other matcher
optimisations more effective. Eric Wong reported this speeds up a
particularly slow case from ~2 minutes to ~3 seconds.
With this change, OP_ELITE_SET can now select a different subset of terms for
each shard regardless of shard type (previously this only happened for remote
shards).
* Avoid triggering a pointless maximum weight recalculation if an unweighted
child of a MultiAndPostList prunes.
* Only check if the database has positional information when the query
uses positional information. This should help improve notmuch delete
performance. Thanks to andreas on #notmuch for analysis of the problem.
glass backend:
* Optimise Glass::Inverter::has_positions(). Use const auto& instead of just
auto for the loop variables. Reported to be faster by andreas on #notmuch.
* Cache result of Glass::Inverter::has_positions() since calculating it is
potentially very expensive, while maintaining a cached answer is very cheap.
remote backend:
* Add missing closing parenthesis to reported remote prog context, which has
been missing since this code was first added over 20 years ago! Spotted by
Gaurav Arora.
build system:
* Enable compiler option -fno-semantic-interposition if supported.
This GCC option allows the compiler to optimise essentially assuming
that functions/variables aren't replaced at dynamic link time.
Such replacement is not something that it's useful to do for Xapian
symbols, and we already turn on -Bsymbolic-functions by default which
prevents such replacement anyway by resolving references within the
library at build time.
Reduces the size of the stripped library on x86-64 Debian unstable by
~1%, and likely makes it faster too.
* Avoid bogus deprecation warning when compiling with GCC without optimisation.
In this situation, GCC emits a deprecation warning for code in the definition
of QueryParser::add_valuerangeprocessor() which is provided for backwards
API compatibility even if this method is never used anywhere.
This isn't helpful, especially if the user is using -Werror, so disable the
-Wdeprecated-deprecations warning for this code.
Reported by starmad on #xapian.
* Fix GCC -Wmaybe-uninitialized warning. The warning seems bogus as it's about
the this pointer being passed to a method which doesn't reference the object,
but we can just make the method static to avoid the warning, and that's
arguably cleaner for a method called from the object initialiser list.
* Automatically enable GCC warnings -Wduplicated-cond and -Wduplicated-branches
if using a GCC version new enough to support them. The usefulness of
-Wduplicated-cond was highlighted by dcb in #816.
* Replace uses of obsolete autoconf macros, fixing warnings if configure is
regenerated with a recent release of autoconf.
* Simplify configure probe for sigsetjmp and siglongjmp. Just probe
individually with AC_CHECK_DECLS and then check that both exist with a
preprocessor check.
* Update XO_LIB_XAPIAN to fix warning that AC_ERROR is obsolete with modern
autoconf.
* Support linking against static libxapian with cmake. Patch from Anonymous
Maarten in https://github.com/xapian/xapian/pull/317
* Clean up handling of libs we link libxapian with - previously any libraries
explicitly specified to configure by the user via LIBS=... as well as -lm
(if configure determined it was needed) could get added to XAPIAN_LIBS
multiple times, as well as also getting added to the libxapian link command
anyway by automake/libtool standard handling.
Specifying a library more than once on the link line is not a problem on
common platforms, but may be an issue somewhere (and it's on less common
platforms where the user is more likely to have to specify LIBS to configure
and/or where -lm may be needed).
documentation:
* configure: Add missing AC_ARG_VAR for all programs so that they are
documented in --help output, and so that autoconf knows they are "precious"
and preserves them if configure is rerun even when they're specified via an
environment variable.
* Don't use x^2 to mean x squared in API docs. This is potentially confusing
since in C/C++ (and some other languages), ^ means exclusive-or. Write x²
instead, which should be clear to all readers.
* Improve docs for Xapian::Stopper and SimpleStopper.
* docs/intro_ir.rst: Fixed an incorrect term index. Patch from Jaak Ristioja
in https://github.com/xapian/xapian/pull/321.
* Update for the IRC channel move from freenode to libera.chat.
examples:
* quest: Don't enable spelling correction by default. It was really only on by
default because the spelling correction support in quest was added before
--flags. It seems more helpful for the default to match the
Xapian::QueryParser API, and also this fixes the weird situation that
`--flags default` isn't the default you get without any `--flags` option.
* quest: Multiple `--flags` options now get combined - previously only the last
was used.
portability:
* Don't automatically use _FORTIFY_SOURCE on mingw-w64. Recent mingw-w64
versions require -lssp to be linked when _FORTIFY_SOURCE is enabled, so just
skip the automatic enabling. Users who want to enable it can specify it
explicitly.
Fixes#808, reported by xpbxf4.
* Workaround NFS issue in test harness function for deleting test databases.
On NFS, rmdir() can fail with EEXIST or ENOTEMPTY (POSIX allows either)
due to .nfs* files which are used by NFS clients to implement the Unix
semantics of a deleted but open file continuing to exist. We now sleep
and retry a few times in this situation to give the NFS client a chance
to process the closing of the open handle. Problem mentioned in #631.
* configure: Drop -lm special case for Sun C++ as this no longer seems to
be required. Tested with Sun C++ 5.13, which is the oldest version we
now support due to us now requiring C++11.
* Use strerrordesc_np() if available. This is a GNU-specific replacement for
sys_errlist and sys_nerr. It was added in glibc 2.32 since which sys_errlist
and sys_nerr are no longer declared in the headers.
* Update debug logging to use std::uncaught_exceptions() under C++17 and later
since this allows the debug logging to detect a function without RETURN()
annotation which exits normally while there's an uncaught exception
(previously the debug logging would think the stack was being unwound through
the function). This also avoids deprecation warnings - the old
std::uncaught_exception() (note: singular) function was deprecated by
C++17 and removed in C++20.
* Increase size of buffer passed to strerror_r() from 128 to 1024 bytes, which
is the size recommended by the man page on Linux.
* Fix -Wdeprecated-copy warning from clang 13.
Version 2.11.0
--------------
- Added lexers:
* BDD
* Elpi
* LilyPond
* Maxima
* Rita
* Savi
* Sed
* Sophia contracts
* Spice
* ``.SRCINFO``
- Updated lexers:
* ABNF: Allow one-character rules
* Assembly: Fix incorrect token endings
* Bibtex: Distinguish between ``comment`` and ``commentary``
* C family: Support unicode identifiers
* CDDL: Fix slow lexing speed
* Debian control: Add missing fields
* Devicetree: Recognize hexadecimal addresses for nodes
* GDScript: Add ``void`` data type
* GSQL
- Fix comment handling
- Fix catastrophic backtracking
* HTML, XML: Improve comment handling
* Java: Add ``yield``
* Makefiles
* objdump-nasm: Improve handling of ``--no-show-raw-insn`` dumps
* Prolog: Support escaped ``\`` inside quoted strings
* Python:
- Support ``~`` in tracebacks
- Support the pattern matching keywords
* RobotFramework: Improve empty brace handling
* Terraform
- Add the 'set' type
- Support heredocs
- Added styles:
* Dracula
* Friendly Grayscale
* LilyPond
* One-Dark
.. note::
All of the new styles unfortunately do not conform to WCAG recommendations.
- There is new infrastructure in place to improve style accessibility. The default style has been updated to conform to WCAG recommendations. All styles are now checked for sufficient contrast by default to prevent regressions.
- Clean up unused imports
- Fix multiple lexers producing repeated single-character tokens
- Fix multiple lexers marking whitespace as ``Text``
- Remove duplicated assignments in the Paraiso style
- ``pygmentize`` supports JSON output for the various list functions now, making it easier to consume them from scripts.
- Use the ``shell`` lexer for ``kshrc`` files
- Use the ``ruby`` lexer for ``Vagrantfile`` files
- Use the C lexer for ``.xbm`` and ``.xpm`` files
- Add a ``groff`` formatter
- Update documentation
- Line anchors now link to themselves
- Add official support for Python 3.10
- Fix several missing colors in dark styles: Gruvbox dark, Monokai, Rrt, Sas, Strata dark
- Associate more file types with ``man`` pages
- The ``HtmlFormatter`` can now emit tooltips for each token to ease debugging of lexers
- Add ``f90`` as an alias for ``fortran``
Release 3.2.1
The release contains the fix the inclusion of both cpp11 and cpp17 headers on C++17 compilation. Also some additional tests for using string literals and string objects with modern compilers.
Release 3.2
Optional support for C++ 17 std::string_view.
Release 3.1.2
Fix for Issue 72.
Release 3.1.1
Include the commits from the previous year.
Release 3.1
This release adds one new API call: unchecked::replace_invalid().
Other changes are mostly about testing and installation.
Release 3.0.3
A minor release that contains fix for Issue 31 Program fails to link when including utf8.h in multiple files.
Release 3.0.2
This minor release contains:
Fix of the project version number at CMakeLists.txt
Continuous Integration with Google Tests and CircleCI
Release 3.0.1
A minor release with a fix for a header guard.
Release 3.0
This is a major release that introduces the following functionality:
New convenience API for C++ 11 and later compilers. The library still works with C++ 98/03 compliant compilers, just without the new functions.
advance() function works in both directions.
The following deprecated functions were removed:
previous() - deprecated since version 1.02.
is_bom() - deprecated since version 2.3.
Changes:
0.8
---
- Optimize number parsing for large number datasets
- Add -F and -R options to allow to specify a different field and record
separator
- Print \n and \t also when using -F/-R options
- Documentation improvements
0.7
---
- Use unlocked I/O by default
- Fix gcc warnings
- Documentation improvements
Release 4.3.2 (released Dec 19, 2021)
=====================================
Bugs fixed
----------
* C and C++, parse fundamental types no matter the order of simple type
specifiers.