Skip to content
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

how to rebuild the html string #68

Open
purple-force opened this issue May 15, 2019 · 6 comments
Open

how to rebuild the html string #68

purple-force opened this issue May 15, 2019 · 6 comments

Comments

@purple-force
Copy link

When i got data by tokenize , how to rebuild the html string?

@rwjblue
Copy link
Collaborator

rwjblue commented May 16, 2019

I don't understand the question, can you explain what you are trying to do?

@purple-force
Copy link
Author

I can get the structural data from html string by tokenize, then how to generate html string by structural data?

@Baltazore
Copy link

@rwjblue I think the question was more about how to construct HTML string from parsed tokens.
And this https://github.com/tildeio/simple-html-tokenizer/blob/v0.1.1/lib/simple-html-tokenizer/generator.js#L27 looks exactly what @purple-force needs.

@Baltazore
Copy link

Do we have generators in latest version?

@rwjblue
Copy link
Collaborator

rwjblue commented Jun 24, 2020

No, it was removed in 01479fe

@Baltazore
Copy link

hey @rwjblue thanks for answer. Any particular reason to remove this part?
I am right now trying to use this tokenizer to parse and modify given HTML snippet. Am I doing it wrong (wrong tool to use) or it is still valid idea, and I just need to implement generator of HTML from tokens tree on my own?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants