Skip to content

Change to better show non-unist fields #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2020
Merged

Change to better show non-unist fields #14

merged 3 commits into from
Apr 28, 2020

Conversation

wooorm
Copy link
Member

@wooorm wooorm commented Apr 25, 2020

Previously, all fields that were not specified by unist, but for example
defined in another spec such as hast, were show rather verbosely on one line.

This especially became unreadable when those fields were populated with a single
node, or a list of nodes.

This change makes fields more readable, by displaying them on their own line,
and supports nodes or list of nodes as the values of those fields.
It also streamlines the indentation a bit: previously, 3 spaces were used: now,
either 2 or 4 spaces.
Finally, there is now a number before each child, which shows its index.

Closes GH-11.

Previously, all fields that were not specified by unist, but for example
defined in another spec such as hast, were show rather verbosely on one line.

This especially became unreadable when those fields were populated with a single
node, or a list of nodes.

This change makes fields more readable, by displaying them on their own line,
and supports nodes or list of nodes as the values of those fields.
It also streamlines the indentation a bit: previously, 3 spaces were used: now,
either 2 or 4 spaces.
Finally, there is now a number before each child, which shows its index.

Closes GH-11.
@wooorm wooorm added 🦋 type/enhancement This is great to have 🙉 open/needs-info This needs some more info 🧑 semver/major This is a change 🗄 area/interface This affects the public interface labels Apr 25, 2020
@wooorm wooorm merged commit 81bbaf0 into master Apr 28, 2020
@wooorm wooorm deleted the node-vs-data branch April 28, 2020 07:36
@wooorm wooorm added ⛵️ status/released and removed 🙉 open/needs-info This needs some more info labels Apr 28, 2020
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧑 semver/major This is a change 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

Add support for a node / list of nodes at fields other than children
2 participants