Skip to content

code data fields be removed #13

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
4 tasks done
Lpmvb opened this issue Sep 3, 2021 · 6 comments
Closed
4 tasks done

code data fields be removed #13

Lpmvb opened this issue Sep 3, 2021 · 6 comments
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on

Comments

@Lpmvb
Copy link

Lpmvb commented Sep 3, 2021

Initial checklist

Affected packages and versions

latest

Link to runnable example

https://node-rqtpry.stackblitz.io

Steps to reproduce

image

Expected behavior

Do not remove this field.

Actual behavior

data field be removed.

Runtime

Node v16

Package manager

npm v7

OS

macOS

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 3, 2021
@wooorm
Copy link
Member

wooorm commented Sep 3, 2021

It is intended that the tree is changed and unrelated data lost, per the readme.
You can handle data fields in a plugin beforehand. Please open a discussion if you have questions about that.

@wooorm wooorm closed this as completed Sep 3, 2021
@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Sep 3, 2021
@github-actions

This comment has been minimized.

@JounQin
Copy link
Member

JounQin commented May 27, 2025

From #29

It is intended that the tree is changed and unrelated data lost, per the readme.

But in README

This package is a utility to parse a document again. It passes each node and embedded raw HTML through an HTML parser (parse5), to recreate a tree exactly as how a browser would parse it, while keeping the original data and positional info intact.

@wooorm I don't see any mentions of "unrelated data lost" , does anything changed?

I raised a new discussion at https://github.com/orgs/syntax-tree/discussions/148.

@wooorm
Copy link
Member

wooorm commented May 28, 2025

The key is in all the other docs: parsing things again.
Everything (except positional info) is lost.

@wooorm
Copy link
Member

wooorm commented May 28, 2025

If the words “original data” threw you off, we can discuss changing them

@JounQin
Copy link
Member

JounQin commented May 28, 2025

If the words “original data” threw you off, we can discuss changing them

Can we discuss at https://github.com/orgs/syntax-tree/discussions/148?

You can handle data fields in a plugin beforehand.

And what about the afterhand? Non raw nodes are also affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

3 participants