[pp:metadata] add 'newline' option (#8439)

* Add configuration setting to control newline characters in metadata.
* update docs/configuration
* introduce 'open()' method
* add 'newline' test
This commit is contained in:
featherbutt
2025-10-21 09:47:39 -07:00
committed by GitHub
parent 3deb5a413d
commit 06e3126bba
3 changed files with 71 additions and 17 deletions

View File

@@ -8225,7 +8225,7 @@ metadata.open
-------------
Type
``string``
Defsult
Default
``"w"``
Description
The ``mode`` in which metadata files get opened.
@@ -8241,7 +8241,7 @@ metadata.encoding
-----------------
Type
``string``
Defsult
Default
``"utf-8"``
Description
Name of the encoding used to encode a file's content.
@@ -8249,6 +8249,29 @@ Description
See the ``encoding`` argument of |open()|_ for further details.
metadata.newline
-----------------
Type
``string``
Default
``null``
Description
The newline sequence used in metadata files.
If ``null``, any ``\n`` characters
written are translated to the system default line separator.
See the ``newline`` argument of |open()|_ for further details.
Supported Values
``null``
Any ``\n`` characters
written are translated to the system default line separator.
``""`` | ``"\n"``
Don't replace newline characters.
``"\r"`` | ``"\r\n"``
Replace newline characters with the given sequence.
metadata.private
----------------
Type