Skip to content

Commit

Permalink
add link to .NET NT implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Oct 14, 2024
1 parent a162d71 commit 69d27b9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
examples/access.nt
.github/workflows/build.yaml.save


# version info
.bump.cfg.nt
Expand Down
2 changes: 1 addition & 1 deletion doc/basic_syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ on the next line, which must be further indented.
> first line of value 5
> second line of value 5
Which is equivalent to the following JSON code:
This is equivalent to the following JSON code:

.. code-block:: json
Expand Down
14 changes: 7 additions & 7 deletions doc/file_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ The *NestedText* format follows a small number of simple rules. Here they are.
lists. They are somewhat constrained in the characters that they may
contain; nothing is allowed that might be confused with the syntax
characters used by the inline list or dictionary that contains it.
Specifically, inline strings may not line-break white space such as newlines
or any of the following characters: ``[``, ``]``, ``{``, ``}``, or ``,``.
In addition, inline strings that are contained in inline dictionaries may
not contain ``:``. Both leading and trailing white space is ignored with
inline strings. This includes all non-line-break white space characters
such as ASCII spaces and tabs, as well as the various Unicode white space
characters.
Specifically, inline strings may not include line-break white space
characters such as newlines or any of the following characters: ``[``,
``]``, ``{``, ``}``, or ``,``. In addition, inline strings that are
contained in inline dictionaries may not contain ``:``. Both leading and
trailing white space is ignored with inline strings. This includes all
non-line-break white space characters such as ASCII spaces and tabs, as well
as the various Unicode white space characters.

Both inline lists and dictionaries may be empty, and represent the only way
to represent empty lists or empty dictionaries in *NestedText*. An empty
Expand Down
4 changes: 2 additions & 2 deletions doc/minimal-nestedtext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe to your users if you decide to use it for your application.
structured data. It is intended to be easily entered, edited, or viewed by
people. As such, the syntax is very simple and intuitive.

It organizes the data into a nested collection of lists and name-value
pairs where the lowest level values are all strings. For example, a simple
It organizes the data into a nested collection of lists and name-value pairs
where the lowest level values are all simple text. For example, a simple
collection of name-value pairs represented using:

.. code-block:: nestedtext
Expand Down
20 changes: 10 additions & 10 deletions doc/related_projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ Official *NestedText* test suite. Also included as submodule in
Implementations
---------------

.NET
""""

`NestedText <https://www.nuget.org/packages/NestedText>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`.NET <https://dotnet.microsoft.com/>`_ implementation of *NestedText*.
Supports :ref:`NestedText v3.7 <v3.7>`.


Go
""

Expand Down Expand Up @@ -66,6 +56,16 @@ a compiled project, so it is significantly lighter in weight than
<v3.0>`.


.NET
""""

`NestedText <https://www.nuget.org/packages/NestedText>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`.NET <https://dotnet.microsoft.com/>`_ implementation of *NestedText*.
Supports :ref:`NestedText v3.7 <v3.7>`.


`@rmw/nestedtext <https://www.npmjs.com/package/@rmw/nestedtext>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions examples/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def pytest_ignore_collect(path):
components = str(path).split('/')
def pytest_ignore_collect(collection_path):
components = collection_path.parts
name = components[-1]
if name.startswith('deploy_') and name.endswith('.py'):
return True
Expand Down
2 changes: 1 addition & 1 deletion nestedtext/nestedtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@ def render_inline_scalar(self, obj, exclude, keys, values):
raise NotSuitableForInline from None
return value

# render content {{{3
# render value {{{3
def render_value(self, obj, keys, values):
level = len(keys)
error = None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nestedtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ def de_dup(key, state):
output = nt.dumps(people, map_keys=keymap)
assert output == document

# withkey normalization
# with key normalization
def normalize_key(key, parent_keys):
return key.lower()

Expand Down

0 comments on commit 69d27b9

Please sign in to comment.