Skip to content

Rename abstract text interface to literal #17

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

Closed
wooorm opened this issue Aug 23, 2018 · 2 comments
Closed

Rename abstract text interface to literal #17

wooorm opened this issue Aug 23, 2018 · 2 comments
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

Comments

@wooorm
Copy link
Member

wooorm commented Aug 23, 2018

The abstract text interface (nodes with a value) interferes with the type: "text" node provided by hast and mdast (and the type: "TextNode" provided by nlcst).

Another downside is that text implies (and specifies) string values on the value field.
Say unist was used for programming values, the value of value could be specified as number, for example.

I’m open to other names, but I’m searching for something close to “raw”, “leaf”, and whatnot.

/CC @ChristianMurphy What do you think?

@wooorm wooorm added 🦋 type/enhancement This is great to have 🧑 semver/major This is a change 🙉 open/needs-info This needs some more info labels Aug 23, 2018
@ChristianMurphy
Copy link
Member

Seems like a good direction to take, replacing Text with something more flexible.
I'd lean a bit toward Literal, Raw may conflict in some configuration type languages where there are template literals and raw literals.
I know groovy-like configuration languages distinguish between "text with ${template}" and 'raw text'

@wooorm
Copy link
Member Author

wooorm commented Aug 23, 2018

@ChristianMurphy Thanks, I totes agree!

Leaf was another thing I thought of, but that would prohibit the use of something that has both a value and children in the future (and a node without value or children could also be a “leaf”, as a concept).

wooorm added a commit that referenced this issue Aug 24, 2018
* Reword `text` > `literal` (GH-17)
* Add introduction
* Reword definitions, terms
* Add more terms
* Add references
* Add more acknowledgements

Closes GH-17.
wooorm added a commit that referenced this issue Aug 27, 2018
* Reword `text` > `literal` (GH-17)
* Add introduction
* Reword definitions, terms
* Add more terms
* Add references
* Add more acknowledgements

Closes GH-17.

Reviewed-by: Christian Murphy <Christian.Murphy.42@gmail.com>
Reviewed-by: Ika <ikatyang@gmail.com>
@wooorm wooorm closed this as completed in 8055bf4 Aug 27, 2018
wooorm added a commit to syntax-tree/mdast that referenced this issue Aug 28, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.
wooorm added a commit to syntax-tree/mdast that referenced this issue Aug 28, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard
* Make `list.ordered` optional (default: `false`)
* Make `list.loose` optional (default: `false`)
* Make `listItem.loose` optional (default: `false`)
* Make `table.align` optional
* Add references to CSS Text for alignTypes

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.
wooorm added a commit to syntax-tree/mdast that referenced this issue Aug 31, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard
* Make `list.ordered` optional (default: `false`)
* Make `list.loose` optional (default: `false`)
* Remove `listItem.loose` (use `list.loose instead)
* Make `table.align` optional
* Add references to CSS Text for alignTypes

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.

Reviewed-by: Christian Murphy <Christian.Murphy.42@gmail.com>
Reviewed-by: Ika <ikatyang@gmail.com>
wooorm added a commit to syntax-tree/mdast that referenced this issue Aug 31, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard
* Make `list.ordered` optional (default: `false`)
* Make `list.loose` optional (default: `false`)
* Remove `listItem.loose` (use `list.loose instead)
* Make `table.align` optional
* Add references to CSS Text for alignTypes

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.
Closes GH-24.

Reviewed-by: Christian Murphy <Christian.Murphy.42@gmail.com>
Reviewed-by: Ika <ikatyang@gmail.com>
@wooorm wooorm added ⛵️ status/released 🗄 area/interface This affects the public interface and removed 🙉 open/needs-info This needs some more info labels Aug 12, 2019
@wooorm wooorm changed the title Rename abstract “text” interface to “literal” Rename abstract text interface to literal Aug 12, 2019
@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 a pull request may close this issue.

2 participants